Solved

asp passing form value to dotnet c#

Posted on 2008-10-01
2
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

623 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