c# - Creating form tag programmatically not working -


i have simple web page contains literal, want create form tag in code behind. example:

if (ispostback) {     literal1.text = "form submit"; } else {     literal1.text = "<form id='myfrom' runat='server' action='default.aspx'                      method='post'><input type='submit' value='click here'/></form>"; } 

this code create form, when click submit button, doesn't go through ispostback path. why?

note need created , sent string, because want use in ajax example.

ispostback enabled when post request originates asp.net's __dopostback() function. see how use __dopostback() how create async postback request javascript.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -