Solved

asp passing form value to dotnet c#

Posted on 2008-10-01
2
269 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 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