Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2006, 03:46 AM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lemonluv07
Default capture variable in URL

I'm new in ASP.net programming
hello will anyone help me..


I have this asp.net code that looks like this...

<%@ Page Language="vb" %>
<script language="vb" runat="server">
    public myOption as string
</script>

<html><head><title></title></head>
<body>
<table>
<tr><td>
   <a href="index.aspx?myOption=About&variable1=value">A bout us</a>
   <a "index.aspx?myOption=Link&variable1=value">lin ks</a>
</td></tr>
<tr><td>
   <%
      select case myOption
          case "About":
        response.Writefile("./components/AboutUs.aspx") case "Link"
        response.Writefile("./components/Link.aspx")

      end select
    %>
</td></tr>
</table>
</body>
</html>


If any of "About Us" or "Links" is clicked, the content of the 2nd row must be the content of the link... and the URL posted in the address bar looks like this..

http://localhost/mywebs/index.aspx?m...ariable1=value

Problem is..
Nothing appears in the 2nd row... when i did the debugging, i found out that the value of "myOption" variable remains empty.

PLease help.

 
Old March 31st, 2006, 04:00 AM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lemonluv07
Default

myOption variable is not declared as public, rather it is declared this way

dim myOption as string


please help....

your assistance is deeply appreciated







Similar Threads
Thread Thread Starter Forum Replies Last Post
capture URL SKhna ASP.NET 2.0 Basics 1 February 5th, 2008 11:02 AM
capture a variable from url. .com?jblp jblp PHP How-To 1 October 25th, 2004 07:26 PM
passing a variable through URL katie456 Classic ASP Databases 2 January 20th, 2004 11:27 PM
prevent error if $_GET variable is not in URL mih100 Beginning PHP 1 September 6th, 2003 08:40 PM
catching an URL variable in xslt Flashlight XSLT 1 August 21st, 2003 01:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.