1. In general, if you want to add some JavaScript features to the web form control on the ASPX page, you can use Attributes.Add to be implemented.
For example, for TextBox TXT, you can: txt.attributes.add ("onclick", "FCN0 ();" then, the FCN0 this JavaScript function will be called when Click is on the web page.
1.1, the exception is that the analysis of the attributes that cannot be identified.
For example, for a Radiobutton RBT, IDE cannot identify the onclick properties, then similar to the above statement, RBT.Attributes.add ("OnClick", "FCN1 (THIS);"); in .NET Framework 1.1, will be parsed into < INPUT TYPE = RADIO ID = RBT οnclick = "FCN1 (this);"> ... and in .NET Framework 1.0, it will be parsed into ... span> Note that the objects corresponding to the parameter THIS are different in FCN1. This is a subtle difference.
2, for HTML Control, you need to do more things.
When designing the ASPX page, drag from the toolbar, such as TextBox to the page, two things happen: 1. ASPX page Multiple sentence
2. Note that the HTML Control corresponding to the front system.web.ui.webcontrols.textbox is System.Web.ui.htmlControls.htmlinputText, the corresponding HTML tag is ,
Accordingly, HTML Tag
corresponding HTML Control is a public system.web.ui.htmlControls.htmlGenericControl mybody; 2.2, there is a one-onSubmit's event for HTML