M
Mark
Hi,
In the aspx file, the form is submitted with a javascript like this:
<form id="ins" method="post">
<input id="sql" name="sql" type="hidden" />
<input runat="server" id="Submit1" type="button" value="click"
onclick="myfunc()"/>
</form>
<script language="javascript" type="text/javascript">
function myfunc()
{
document.getElementById("sql").value=inscomm
document.getElementById("ins").submit()
return true;
}
</script>
In the code-behind page, i did this (which doesn't work):
--------------------------------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim sqlcomm As String
sqlcomm = Request.Form("sql")
If page.IsPostBack
response.write("ok")
else
....
I can solve this by doing this (which works):
-------------------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim sqlcomm As String
sqlcomm = Request.Form("sql")
If sqlcomm <> "" Then
response.write("ok")
else
....
My question: why is this not considered as a postback?
Thanks
Marc
In the aspx file, the form is submitted with a javascript like this:
<form id="ins" method="post">
<input id="sql" name="sql" type="hidden" />
<input runat="server" id="Submit1" type="button" value="click"
onclick="myfunc()"/>
</form>
<script language="javascript" type="text/javascript">
function myfunc()
{
document.getElementById("sql").value=inscomm
document.getElementById("ins").submit()
return true;
}
</script>
In the code-behind page, i did this (which doesn't work):
--------------------------------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim sqlcomm As String
sqlcomm = Request.Form("sql")
If page.IsPostBack
response.write("ok")
else
....
I can solve this by doing this (which works):
-------------------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim sqlcomm As String
sqlcomm = Request.Form("sql")
If sqlcomm <> "" Then
response.write("ok")
else
....
My question: why is this not considered as a postback?
Thanks
Marc