Precompiling ASP.NET code? (Am also a bit puzzled

Results 1 to 4 of 4

Thread: Precompiling ASP.NET code? (Am also a bit puzzled

  1. #1
    Join Date
    Dec 1969

    Default Precompiling ASP.NET code? (Am also a bit puzzled

    Hello everyone,<BR><BR>I want to use a seperate class for my database connection (database.vb) and I have a template file (template.vb) that my other pages inherit.<BR>My understanding is that when I have a file: index.aspx.vb it will look like: Public Class PageIndex : Inherits PageTemplate<BR>While the PageTemplate looks like: Public Class PageTemplate : Inherits Page<BR><BR>When I just do this, the index page doesn&#039;t know the PageTemplate. My understanding is that I need to precompile this file first.<BR>Is there a way to do this without VS.NET? (Or if that is not possible: I do have VS.NET, but I can&#039;t get IIS running so I can&#039;t start a Web Application, is there some command code?)<BR><BR>The second problem is, if I also compile the database.vb, can I then automatically use the class? Or how do I tell my index.aspx.vb that I will be using it? (ie: I will use something like "Conn = New DBClass(ConnString)" but how do I tell it where the DBClass class is?)

  2. #2

    Default RE: Precompiling ASP.NET code? (Am also a bit puzz

    You don&#039;t inherit the aspx page, only the code-behind.<BR><BR>You might want to consider buying a book.

  3. #3
    Join Date
    Dec 1969

    Default That was not quite constructive now was it...

    I know that much. I have aspx and aspx.vb files. If you had actually read my post you would have seen me mention .aspx.vb files.<BR><BR>I have experience in ASP (And a little in VB.NET) and I just have to do a small project in ASP.NET. It&#039;s not really worth buying a book for. (More so because I already have a completely useless one I had to buy for school - for those who wonder about "useless": it&#039;s pure theoretical and contains almost no sample code)<BR><BR>So my question:<BR>If I want to inherit a custom made class in my code-behind, do I need to precompile it first. And if so, how can it be done with/out VS.NET?<BR>Setup is like: UI.Page -&#062; PageTemplate -&#062; ActualFile<BR><BR>Aside from that if I want to use another custom class (DB class) in some ActualFiles, how is it done?<BR><BR>Thanks!<BR><BR>Andrew:<BR>Prove me wrong but as I read over the posts, they usually aren&#039;t very constructive. Are you sure you are one of the ASP.NET gurus? I apologise if you are just tired of answering the same questions over and over again.

  4. #4

    Default RE: That was not quite constructive now was it...

    You dont have to "precompile".<BR>If the class in question is the same project, it will be compiled with the rest of the project.<BR><BR>If the class is in a separate project, you will need to compile that project before compiling the main/dependant project.<BR><BR>If you are looking for something other than VS.Net or csc.exe to compile with, you could look at Nant.<BR><BR>The contructiveness of my posts are a function of the questions I respond to and my level of frustration at that moment. People seem to like asking stupid questions, the kind that they should learn to find the answers for. <BR>Why? Because it is faster, because they are waisting time by posting here.<BR><BR>I don&#039;t recall having claimed to be an ASP.Net Guru, although I did once see a post that addressed (what I though was) me amongst a list of "gurus" here.<BR><BR>If you have a difficult problem I can and probably will help.<BR>If your problem is simple, I will probably give an answer that will force you to think.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts