Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m new in asp i have a page named 'labour.asp' having two button 'submit' and 'cancel'.
my question is that before submitting the value of page it first check the value of i if value of i greater than 5 then submit the page 'labour.asp' and go to the next page 'check.asp' for example.

i=1
if i>5 then
submit the value of 'labour.asp' page and go to the next page 'check.asp'
else
exit
Posted
Updated 10-Oct-13 23:11pm
v2
Comments
Prasad Khandekar 11-Oct-13 5:22am    
In your code snippet i is never going to be greater than 5. Your question is also confusing, what do you mean by submit the value of 'labour.asp' page and goto next page?

Are you talking about client side behavior? If yes then it's going to be JavaScript code, which either can get embedded in the ASP page (outside <% %> tags) or can get referenced in resulting HTML page via <script type="javascript" src="your_javascript.js"/> tag.

Regards,

1 solution

Try this and let me know.
VB
<%
Dim i
i= 6
If i= 6 Then
    Response.Redirect("check.asp")
Else
Exit;
End If
%>
 
Share this answer
 
Comments
Member 10329833 11-Oct-13 7:24am    
ehsann assu the above code is not working
[no name] 11-Oct-13 7:30am    
What is the Error?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900