Calling function in CS from ASPX and passing parameter

Hi guys,
Lets get to the point.

I have a label in ASPX file. OnLoad of that event i want to call a function in my ASPX.CS file.
ASPX file should pass a parameter lets say "Name"

Can someone show me the syntax on how to write it in CS and ASPX file both

IN ASPX FILE
<asp:label id="label" runat="server" OnLoad="FunctiionCAll(parameter)"><ASp:/label>

IN CS FILE
protected void FUnctionCALL(string abc)
{
abc=abc+"HI";
body body
}

Can someone plz do this ,
thank you
 
Re: Callling function in CS from ASPX and passing parameter

I am totally confused here. The OnLoad() is a page event right? Why can't you right code (to call whatever methid you want) in your OnLoad (which is obviously in aspx.cs) ?
I'd like to hear more about this problem before getting into premature commenting.
 
Re: Callling function in CS from ASPX and passing parameter

see the page life cycle and am sure you will get the answer.
 
Back
Top