I'm creating a dynamic form in javascript on an aspx.vb file using clientstartupscript.
I just can't get it to submit/post to the asp page from aspx.vb
The asp page expects to get the variables from the form object. request.form("1")
I am creating a form, with a input type and name/id of "1"... but its just not submitting.
Fiddler is throwing me a 200 status, and I'm not getting any errors.
It just won't go to the page!
I tried... creating a normal html page and using this exact dynamic form and i tried to manually post to asp and it worked as a sample!.. but from aspx.. something is not right!
Please help. See Code Below:
startpage.aspx.vb
Code:
"var f = document.createElement('form'); " & _
"var r = document.createElement('input'); " & _
"r.type = 'hidden'; " & _
"r.name = '1'; " & _
"r.value = " + rid + "; " & _
"f.appendChild(r); " & _
"var mq = document.createElement('input'); " & _
"mq.type = 'hidden'; " & _
"mq.name = '3'; " & _
"mq.value = " + qtotal + "; " & _
"f.method = 'POST'; " & _
"f.action = 'targetpage.asp'; " & _
"alert('Submitting to SelExit'); " & _
"f.submit(); "
Page.ClientScript.RegisterStartupScript(Me.GetType(), "ClientScript", javstring, True)
end page/ target page .asp
Code:
request.form("1")
request.form("3")
It got to the submitted to selexit alert box, but then went no where, just got stuck in the start page. blank screen.. no errors.. whathef