开发者

Access control on other page in asp.net

How to access contro开发者_如何学Cl in other aspx page from other aspx page in asp.net


you can use findcontrol

Example to get the textbox text:

string   controlValue =((TextBox)( Page.FindControl("uc").FindControl("TextBox1"))).Text;

Note: us is id of usercontrol registered in the aspx page. TextBox1 is the textbox in the usercontrol


Button btn = ((Button)PreviousPage.FindControl("Button1"));
Button1.Text = btn.Text;

Use : PreviousPage

Note : PreviousPage property Gets the page that transferred control to the current page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜