c# - Calling a user control from a back end page -


i have input text box , button runs on myapppage.aspx , when user clicks button want populate user control page. how call control in embedded usercontrol.ascx file in .net?

you can provide public property in usercontrol exposes control controller (f.e. page). since you've mentioned literal control:

public string text {     get{ return myliteral.text; }     set{ myliteral.text=value; } }  

now can use page:

myusercontrol.text = "hello world"; 

i provide as necessary. not return control itself. still change control type without breaking code. example if want replace literal textbox or label.


Comments

Popular posts from this blog

rest - Spring boot: Request method 'PUT' not supported -

php - Magento - Deleted Base url key -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -