Solved

Pass Variable from ASPX to vb

Posted on 2014-09-11
5
220 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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 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