Solved

Populating querystring in asp:textbox on ascx page

Posted on 2009-03-30
3
881 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
Comment Utility
try with case
Request.QueryString("game")
Anurag
0
 

Author Comment

by:mrduckers
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

6 Experts available now in Live!

Get 1:1 Help Now