Solved

asp passing form value to dotnet c#

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

706 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

19 Experts available now in Live!

Get 1:1 Help Now