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

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -