Click to See Complete Forum and Search --> : Custom ASP.NET server controls


NikhilCK
May 21st, 2002, 02:44 AM
Hi,
How do you set the values of attributes of a custom server control?
The following code doesn't compile

<CustomControl:LoginControl LoginID="<%= Session["empid"] %>" Password="<%= Session["password"] %>" runat="server"/>

why?
How can I set the attributes then?

NikhilCK
May 21st, 2002, 02:48 AM
<CustomControl:LoginControl LoginID=<%= Session["empid"] %> Password=<%= Session["password"] %> runat="server"/>

basically assigning a c# variable to a parameter

NikhilCK
May 21st, 2002, 09:16 AM
Hello,
this site is having problem with asp code being copy pasted here. Neways, I will post my query without the code. How do u assign C# variable's value to a custom server control? We can do it very easily in jsp tags, using scriptlets.
Thanks,
Nikhil