Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
on button click i want to bind data with html from code behind cs file.
Posted
Updated 21-Feb-14 5:57am
v2
Comments
ZurdoDev 21-Feb-14 10:57am    
Where are you stuck?
utm 22-Feb-14 2:16am    
htmlStr = htmlStr + "<tr>";
for (cellCtr = 0; cellCtr <= cellCnt; cellCtr++)
{
htmlStr += "<td>" + cellvalue + "</td>";
cellvalue = cellvalue + 1;
}
htmlStr = htmlStr + "</tr>";

i have bind the html according to my need now i want to display this html in aspx page on button click event . i have try <%htmlstr%> in aspx page but it not working. plz help.
utm 22-Feb-14 15:26pm    
sorry.. for late reply :(
ZurdoDev 22-Feb-14 16:22pm    
Again, where though are you stuck? In a button click event? Just double-click your button and that will create the click event for you.
utm 23-Feb-14 1:23am    
i can create htmlstr on button click but

how can i pass my htmlstr at runtime to the .aspx page on button click

protected void Btn_gen_Click(object sender, EventArgs e)
{
???? how ?

}

You can add a label to your page and then set the Text property to the html you are generating.

However, it appears like you are trying to do a lot of work that comes built in to .Net so perhaps .Net is not the right language or perhaps you need to learn how to use .Net controls.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900