Carl, I pre-compiled the code, restarted XSP and the page loads fine with no errors.
However, I have now discovered an new problem. I have an editable datagrid with textboxes and I loop through the datagrid using DataGrid1.Items.Count. The DataGrid displays fine and under in WinXP I can extract the textboxes from the DataGrid, but under Mono the DataGrid.Items.Count property = 0. I guess I will have to do some more research. Regarding C# books, I will browse the local bookstore when I am passing. Alan. On 10/9/05, Carl Olsen <[EMAIL PROTECTED]> wrote: > Hi Alan, > > I've never tried to compile it on the fly. I always pre-compile everything. > Use "protected" instead of "private" when you do a button click in a code > behind page, unless you use an event handler. I'm not an expert, but it > appears that I can use a private method when I have an event handler, and it > appears that I need to use protected methods when I simple call the function > from the aspx page. I'm reading books on OOP, but I'm still just a > beginner. It sounds like you could benefit from a book on OOP. I'm reading > OOP for C# and OOP for PHP, and it helps to see it used with a couple > different programming languages, so you really see how it sits under the > language as the foundation. Apress and Wrox have excellent books on these > topics, although I think that the Apress books have the edge. > > Carl > > -----Original Message----- > From: Alan Campbell [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 09, 2005 12:36 PM > To: [EMAIL PROTECTED] > Cc: [email protected] > Subject: Re: [Mono-list] asp.net and Npgsql namespace not found > > Carl, > > do you compile your codebehind pages into dlls? If I compile my > codebehind into a dll the error disappears. Do you think that if the > codebehind page is compiled on the fly it doesn't find the Npgsql > library? > > Using the compiled codebehind dll I not get errors like > test.Button1_Click(object, System.EventArgs)' is inaccessible due to > its protection level > > Looks like I will have to search for a solution to this problem. > > thanks, > Alan. > > On 10/9/05, Alan Campbell <[EMAIL PROTECTED]> wrote: > > Carl, > > > > thanks again. I already have Npgsql referenced in my codebehind page > > and I can compile console applications that reference Npgsql fine. It > > looks like it might be something else. > > > > I will probably remove the debian backports of Mono and install via > > the Mono installer. > > > > Alan. > > > > On 10/9/05, Carl Olsen <[EMAIL PROTECTED]> wrote: > > > I'm not familiar with inline code or vb.net. I put all of my code into > code > > > behind pages (c#.net). With Npgsql, I put all of my data code (c#.net) > into > > > class files and make objects to represent the data. When I actually use > the > > > data in my web pages, I'm just instantiating data objects, so I don't > use > > > the reference to Npgsql at all in those pages. If you already have > Npgsql > > > in the GAC and you are using Npgsql referenced in your code page, then > you > > > may have another issue unrelated to Npgsql that is causing the problem. > > > > > > Carl > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of Alan Campbell > > > Sent: Sunday, October 09, 2005 9:59 AM > > > To: [EMAIL PROTECTED]; [email protected] > > > Subject: Re: [Mono-list] asp.net and Npgsql namespace not found > > > > > > Carl, > > > > > > thanks for the information. I installed in the GAC. I already had > > > "using Npgsql;" in my code. It still has not helped. > > > > > > On a similar note, for a vb.net aspx page I had to have the following > lines: > > > <%@ import Namespace="Npgsql" %> > > > <%@ Assembly Name="Npgsql" %> > > > > > > Do I need an equivalent "Assembly Name" line in my csharp file? > > > > > > Alan. > > > > > > On 10/9/05, Carl Olsen <[EMAIL PROTECTED]> wrote: > > > > That should be: > > > > > > > > gacutil -i Npgsql.dll > > > > > > > > Microsoft word automatically capitalized the "i" for me, which is > probably > > > > going to create a compile error. > > > > > > > > Carl > > > > > > > > -----Original Message----- > > > > From: [EMAIL PROTECTED] > > > > [mailto:[EMAIL PROTECTED] On Behalf Of Carl Olsen > > > > Sent: Sunday, October 09, 2005 8:46 AM > > > > To: 'Alan Campbell'; [email protected] > > > > Subject: RE: [Mono-list] asp.net and Npgsql namespace not found > > > > > > > > I installed Npgsql.dll in the Global Assembly Cache (GAC) by running > the > > > GAC > > > > utility, like this: > > > > > > > > gacutil -I Npgsql.dll > > > > > > > > I also include it in the code page, like this: > > > > > > > > using Npgsql; > > > > > > > > That should take care of it. I believe the RMPs will install it in > the > > > GAC > > > > as well, but it won't hurt to install it again. > > > > > > > > Carl Olsen > > > > http://www.carl-olsen.com/ > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: [EMAIL PROTECTED] > > > > [mailto:[EMAIL PROTECTED] On Behalf Of Alan Campbell > > > > Sent: Sunday, October 09, 2005 7:14 AM > > > > To: [email protected] > > > > Subject: [Mono-list] asp.net and Npgsql namespace not found > > > > > > > > Hi all, > > > > > > > > I am trying to convert code from IIS/Access DB to XSP (or mono-mono) / > > > > PostgreSQL in Debian Sarge. I can compile and run the Npgsql sample > > > > code fine. But, I get the following error when I try and use Npgsql > > > > in my codebehind page. > > > > > > > > error CS0246: The type or namespace name `Npgsql' could not be found. > > > > Are you missing a using directive or an assembly reference? > > > > > > > > I guess I am missing something simple, but i could not find a similar > > > > message on the list. Browsing the archives on neotonic.com appear to > > > > be broken. > > > > > > > > Thanks > > > > Alan Campbell. > > > > _______________________________________________ > > > > Mono-list maillist - [email protected] > > > > http://lists.ximian.com/mailman/listinfo/mono-list > > > > > > > > _______________________________________________ > > > > Mono-list maillist - [email protected] > > > > http://lists.ximian.com/mailman/listinfo/mono-list > > > > > > > > > > > _______________________________________________ > > > Mono-list maillist - [email protected] > > > http://lists.ximian.com/mailman/listinfo/mono-list > > > > > > > > > > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
