Solved

Populating querystring in asp:textbox on ascx page

Posted on 2009-03-30
3
889 Views
Last Modified: 2013-11-05
Hi,

I'm trying to prepolate my text box with a querystring and not sure how to do it.

in the example below I'd like the input box to display 'lorem'

Code:
<asp:TextBox ID="txtName" runat="server" />

querystring is:  xxx.aspx?game=lorem

I've tried this but it didn't work.
<asp:TextBox ID="txtName" runat="server"><%= request.querystring("game") %></asp:TextBox>

thanks and let me know if any questions.
0
Comment
Question by:mrduckers
[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
  • 2
3 Comments
 
LVL 11

Expert Comment

by:Anurag Agarwal
ID: 24018063
try with case
Request.QueryString("game")
Anurag
0
 

Author Comment

by:mrduckers
ID: 24022822
I get this error
Error creating control (/usercontrols/GamesForm.ascx).
Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information!

I'm using umbraco cms.
0
 

Accepted Solution

by:
mrduckers earned 0 total points
ID: 24033609
I've solved this using
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        txtGameRequested.text = Request("game")
End Sub
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

696 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