Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Taking control over a button
Message
 
To
11/05/2006 02:57:23
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01120906
Message ID:
01121202
Views:
11
This message has been marked as the solution to the initial question of the thread.
Hi Michel,

Instead of an asp:Button control you could use a regular input button, like this:
<input id="Button1" type="button" value="button" />
This button will not become an object server side and the ASP.NET engine will simply render its HTML exactly as is.

If, on the other hand, you want to have programatic control over this button server-side you can simply add the runat="server" attribute on the element and it will become available in your code-behind:

In the aspx:
<input runat="server" id="Button1" type="button" value="button" />
In the aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
    this.Button1.Value = "Click me";
}
-----
Fabio Vazquez
http://www.fabiovazquez.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform