By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,330 Members | 1,274 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,330 IT Pros & Developers. It's quick & easy.

Understanding code-behind and functions.

P: n/a
Hello,

I am currently new to .NET, as you can probably tell by my last two or three
threads!!!

Anyway, I am using code behind as much as possible - and am curious about
the way in which functions can be triggered.

It seems if I use an <asp:button...control, I can assign a function which
exisits on my .CS file, for example:
<asp:button... OnClick="Button_Click">

However, this function is not available on for example a standard <Atag:
<A href="#" OnClick="Button_Click" runat="server" />

I am *guessing* this is because the button submits the .net form, which
forces the page to read the CS file again, which is when it can execute the
various functions?

My question is, is it possible or sensible to try and access these functions
without using a form button?

Regards,

Gary.

Jan 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Gary" <g@nospam.comwrote in message news:ef*************@TK2MSFTNGP06.phx.gbl...
Hello,

I am currently new to .NET, as you can probably tell by my last two or three
threads!!!

Anyway, I am using code behind as much as possible - and am curious about
the way in which functions can be triggered.

It seems if I use an <asp:button...control, I can assign a function which
exisits on my .CS file, for example:
<asp:button... OnClick="Button_Click">

However, this function is not available on for example a standard <Atag:
<A href="#" OnClick="Button_Click" runat="server" />

I am *guessing* this is because the button submits the .net form, which
forces the page to read the CS file again, which is when it can execute the
various functions?

My question is, is it possible or sensible to try and access these functions
without using a form button?

Regards,

Gary.

Please post asp.net related questions to the ASP.NET NG <Microsoft.public.framework.aspnet>

Willy.

Jan 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.