Last post Jun 05, 2008 12:04 AM by Nai-Dong Jin - MSFT
Jun 03, 2008 04:51 AM|pafo|LINK
I just cant seem to understand how this works, i want to dyn. print a control to the aspx page and then capture the result, but its not working, what am i missing? When i run this, it prints the form but i get nothing back when i press the submit.
Jun 03, 2008 05:02 AM|emady|LINK
hey my friend,
I think you lost the part that you need write some code to onclick of button like this: in last line add this code:
mBut.Click += new EventHandler(Button1_Click);
also you need to add this code
void Button1_Click(object sender, EventArgs e)
// do whatever you want to do !
also I think you need to override render and in that just call the parent control Render
Jun 03, 2008 05:08 AM|pafo|LINK
I tried it, but it still dosent do anything =/, any other ideas?
Jun 03, 2008 08:08 AM|emady|LINK
what do you want to do exactly?
Jun 03, 2008 10:06 AM|pafo|LINK
I just want to get the text that the user enters into the textboxes. In that code im just trying to see where i can catch and then display it to the user, but i cant seem to find out where to get the text that the user enters.
Jun 05, 2008 12:04 AM|Nai-Dong Jin - MSFT|LINK
From your description, it seems that you want to create a custom server control which handles Postback Data, right?
If so, I suggest that you can try the following article which shows a tutorial on how to handle the postback data.