Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Populating querystring in asp:textbox on ascx page

Posted on 2009-03-30
3
Medium Priority
?
891 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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