Solved

asp passing form value to dotnet c#

Posted on 2008-10-01
2
263 Views
Last Modified: 2012-05-05
Hello,
I have an asp page, I want it to pass a form value to an .aspx page. Can any one tell me how to write an if else for the .aspx page, where as if the value been passed to the aspx page is not = 456 then redirect the page. If i was to add asp to my aspx page this is what I would want

   <% If ( Form("picid")) <> (456) Then  
    Response.redirect("index.asp")    
       End If  %>

I was wondering how to do this for an aspx page.

grateful for any input

regards

k
0
Comment
Question by:thatelvis
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 500 total points
ID: 22613331
Hello thatelvis,

It is remarkably similar in fact. Something like this:

Regards,

TimCottee
   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     If Request.Form("picid") <> 456 Then
        Response.Redirect("index.asp")
     End If
   End Sub

Open in new window

0
 
LVL 1

Author Closing Comment

by:thatelvis
ID: 31501923
Thank you and have a great weekend!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now