Solved

Populating querystring in asp:textbox on ascx page

Posted on 2009-03-30
3
887 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
  • 2
3 Comments
 
LVL 11

Expert Comment

by:anuragal
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 56
Error in JQuery 5 51
Gridview selected row 9 43
ASP.NET - Bind Gridview Datasource to a specific table in dataset 3 27
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 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

8 Experts available now in Live!

Get 1:1 Help Now