Ask a Question related to ASP.NET Web Services, Design and Development.
-
Ben Ong #1
<%@ Page Language... question
Hi I'm a new .NET developer and I was wondering if someone could
explain to me what exactly does each of these things do.
the "<%@ %>" -- does this define a namespace?
Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false"
Inherits="HelloWorld.WebForm1"
and if i take those out and define the Page_Load function in the .aspx
file what the differences, if any, would be if i left the above listed
attributes in and defined the Page_Load function in the .aspx.cs file.
Thanks,
Ben
coding in C#;
Ben Ong Guest
-
Page Visibility and Language Translator
Could anyone advise me, I have built an educational website? All finished, is it to late to add a feature, to help Viewers with visibility issues... -
CS2 Korean language/font question
HELP! I'm designing a mailing that includes Korean. Since I don't speak the language, I had a client email her text in a Word document. I was... -
#25051 [Opn->WFx]: translating between gettext language identifiers and 'Accept-Language' ones
ID: 25051 Updated by: sniper@php.net Reported By: wouter at grep dot be -Status: Open +Status: Wont... -
#25051 [NEW]: translating between gettext language identifiers and 'Accept-Language' ones
From: wouter at grep dot be Operating system: irrelevant PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug... -
How to prevent the language icon from disappearing and a language switching delay?
What is wrong with my question since nobody answers it? How to improve the question? "Dmitriy Kopnichev" <kopn@hotbox.ru> wrote in message... -
Steve Lutz #2
Re: <%@ Page Language... question
If you put your code in the .ASPX file and not in code-behind, your site
will be compiled at runtime.
If you put your code in the code-behind file, then the site must be compiled
before it will work.
The attributes indicate the code behind file. In your case, you created a
class "Hello.World.WebForm1" in the code behind file. If you notice, your
ASPX page inherits from that. The page's class is something like
"Hello.World.WebForm1_ASPX" and this is the class the gets executed on the
server when the page is hit.
If you do not have a codebehind file, and leave the directives on the ASPX
page, when you load the page, it won't be able to find the code-behind file.
(Parser error I believe)
I also suggest using code-behind, because you catch the common errors that
way: syntax errors, type mismatches, etc. If you don't compile your code,
you are left with the front end compiling the code when the page is
requested as well, which could slow down performance. Also, using code
behind makes it easier to seperate the code from the display of the page.
Steve
"Ben Ong" <ben.ong@natoil.com> wrote in message
news:1106754645.416996.101910@z14g2000cwz.googlegr oups.com...> Hi I'm a new .NET developer and I was wondering if someone could
> explain to me what exactly does each of these things do.
>
> the "<%@ %>" -- does this define a namespace?
>
> Codebehind="WebForm1.aspx.cs"
> AutoEventWireup="false"
> Inherits="HelloWorld.WebForm1"
>
> and if i take those out and define the Page_Load function in the .aspx
> file what the differences, if any, would be if i left the above listed
> attributes in and defined the Page_Load function in the .aspx.cs file.
> Thanks,
>
> Ben
>
> coding in C#;
>
Steve Lutz Guest
-
Ben Ong #3
Re: <%@ Page Language... question
Thank you sir. I appreciate your help. That just made understanding
how to code in visual studio and .net a little bit easier.
-ben
Ben Ong Guest



Reply With Quote

