?
Solved

Pass Variable from ASPX to vb

Posted on 2014-09-11
5
Medium Priority
?
222 Views
Last Modified: 2014-09-11
Hello I am working with a ASPX script and it works just fine. I am new to .NET and need help passing a variable from

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SearchBranchListTest.aspx.vb" Inherits="SearchBranchListTest" %>

Open in new window


to the .vb page I am using to execute to request..

What is the best way for me to pass a variable.

Thanks
0
Comment
Question by:bradley525
[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
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 40318404
A bit more of an explanation of what you are trying to achieve would help it's a bit vague as it stands.

A common way to pass a value from the aspx page to the codebehind would be to use an asp:HiddenField control to store a value and read the value from the codebehind by referencing the hiddenfield control
0
 

Author Comment

by:bradley525
ID: 40318412
Hello,

What you described will work. I have a URL directing to the page with a few variables in the string such as

?id=1&type=new

I need to pass them to the vb page.
Thank you
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 2000 total points
ID: 40318416
To read variables passed as part of the url as a querystring you can use the Request object :

Dim id as String = Request.QueryString("id")
Dim type as String = Request.QueryString("type")
0
 

Author Comment

by:bradley525
ID: 40318417
I can do this on the vb page?
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 40318418
Yes
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 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