Solved

Pass Variable from ASPX to vb

Posted on 2014-09-11
5
211 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
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I can do this on the vb page?
0
 
LVL 29

Expert Comment

by:Paul Jackson
Comment Utility
Yes
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

18 Experts available now in Live!

Get 1:1 Help Now