开发者

How to get values of non-asp controls in an asp.net project?

I would like to know how to get the values from non-asp controls in my C# code? Can someone help me 开发者_C百科with this? Thanks.


You can apply the runat="server" tag to standard HTML controls, as well. Absent doing that, you can also check the Request object in your code.

string foo = Request.Form["controlName"];


If the control is embedded inside a <form> tag you can use the Request["<control name>"]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜