R
Rob Meade
Hi all,
Ok - I have a bit of a problem with a login page.
Originally it was written in normal asp - the page displayed the form, the
user entered their details, it posted back to itself, validated them and
then posted on again (using a form) to the relevant applications - sending
with it a session id from SQL server.
What I need to do at the moment is create a second stage to this and in
..net...
The process will be like this :
1. .asp page loads and displays form, user enters their details, form posts
to itself and validates.
2. Based on a successful login the .asp has a <form> inside the code which
then posts of to my new .aspx page.
3. the page_onload in the .aspx then takes the values from the hidden form
tags and runs a stored procedure.
All of the above I have running and working fine - but what I need to do now
is post using a form to the application, as I need to send in the hidden
tags the session id etc, I also need to have the action= part of the form
equal the value of a variable....
In old asp I'd have had something like :
<%
' successful log
%>
<body onload = "javascript:document.formname.submit();">
<form action="<%=strURL%>" method="post">
<input type="hidden" name="sessionid" value="<%=strSessionID%>">
</form>
</body>
<%
' not a successful login
%>
etc etc - but I cant work out how to achieve the same in .net - if I create
the form above on the html view in visual studio the form surely needs to
have runat = server - therefore I cant add an action= to it can I?
Any help on this would be appreciate, I am aiming to get this update out
today and this is my only problem at the moment...
Regards
Rob
Ok - I have a bit of a problem with a login page.
Originally it was written in normal asp - the page displayed the form, the
user entered their details, it posted back to itself, validated them and
then posted on again (using a form) to the relevant applications - sending
with it a session id from SQL server.
What I need to do at the moment is create a second stage to this and in
..net...
The process will be like this :
1. .asp page loads and displays form, user enters their details, form posts
to itself and validates.
2. Based on a successful login the .asp has a <form> inside the code which
then posts of to my new .aspx page.
3. the page_onload in the .aspx then takes the values from the hidden form
tags and runs a stored procedure.
All of the above I have running and working fine - but what I need to do now
is post using a form to the application, as I need to send in the hidden
tags the session id etc, I also need to have the action= part of the form
equal the value of a variable....
In old asp I'd have had something like :
<%
' successful log
%>
<body onload = "javascript:document.formname.submit();">
<form action="<%=strURL%>" method="post">
<input type="hidden" name="sessionid" value="<%=strSessionID%>">
</form>
</body>
<%
' not a successful login
%>
etc etc - but I cant work out how to achieve the same in .net - if I create
the form above on the html view in visual studio the form surely needs to
have runat = server - therefore I cant add an action= to it can I?
Any help on this would be appreciate, I am aiming to get this update out
today and this is my only problem at the moment...
Regards
Rob