Print Page | Close Window

LinkButton control variable and use in VB function

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=26141
Printed Date: 29 March 2026 at 9:17am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: LinkButton control variable and use in VB function
Posted By: webpaws
Subject: LinkButton control variable and use in VB function
Date Posted: 20 August 2008 at 5:46am
I am new to asp.net/VB and have been trying to make an HTML control (LinkButton or RadioButton) set a variable in the behind code in VB and run in a paging function to display a certain number of items in a datalist.

I can get the radiobutton values assigned to a variable and post back through a Response.Write, but the variable is null within the behind VB code function.  Is there a way to set a global variable to be passed into a VB function created from a radio button submit or linkbutton submit?


-------------
Anyone who has never made a mistake has never tried anything new. - Albert Einstein



Replies:
Posted By: webpaws
Date Posted: 27 August 2008 at 6:57pm
This problem was solved using a URL variable and pulling the info (URL variable) via a Request.QueryString("variable") command.

e.g., the page being called:  http://www.mywebsite.com?variable=mydata

The VB code behind:
 variable = Request.QueryString("variable") 'which equals "mydata"

-------------
Anyone who has never made a mistake has never tried anything new. - Albert Einstein



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net