473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

URL direct

Hello everyone,

I'm trying to do something which should be incredibly simple. I would like
to create an aspx page with one text box and one submit button on it. The
text box would allow a user to enter a word (or anything really.) Upon
submission, the browser would load a URL with the word string appended at
the end in the current window. Please can anyone help?
James
Feb 18 '07 #1
3 1182
Try using the following command:

Response.Redirect(Request.Url.AbsolutePath & txtMyTextBox.Text)

Place this code in the Click event of your submit button. If you need any
extra text included in the URL (such as a ?myword= if you are trying to
create a querystring), simply modify the String that is used as the
parameter. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"James" <ja*********@ntlworld.comwrote in message
news:Bh******************@newsfe7-win.ntli.net...
Hello everyone,

I'm trying to do something which should be incredibly simple. I would like
to create an aspx page with one text box and one submit button on it. The
text box would allow a user to enter a word (or anything really.) Upon
submission, the browser would load a URL with the word string appended at
the end in the current window. Please can anyone help?
James


Feb 18 '07 #2
Fankoo! Xo)
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:uJ**************@TK2MSFTNGP02.phx.gbl...
Try using the following command:

Response.Redirect(Request.Url.AbsolutePath & txtMyTextBox.Text)

Place this code in the Click event of your submit button. If you need any
extra text included in the URL (such as a ?myword= if you are trying to
create a querystring), simply modify the String that is used as the
parameter. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"James" <ja*********@ntlworld.comwrote in message
news:Bh******************@newsfe7-win.ntli.net...
Hello everyone,

I'm trying to do something which should be incredibly simple. I would
like
to create an aspx page with one text box and one submit button on it.
The
text box would allow a user to enter a word (or anything really.) Upon
submission, the browser would load a URL with the word string appended
at
the end in the current window. Please can anyone help?
James


Feb 18 '07 #3
C#
string appendWord = textbox1.Text;
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.Append(Request.Url.AbsolutePath.ToStrin g());
urlBuilder.Append("?myword=");
urlBuilder.Append(appendWord);

Response.Redirect(urlBuilder.ToString());

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

********************************************
Think outside the box!
********************************************
"James" <ja*********@ntlworld.comwrote in message
news:Bh******************@newsfe7-win.ntli.net...
Hello everyone,

I'm trying to do something which should be incredibly simple. I would like
to create an aspx page with one text box and one submit button on it. The
text box would allow a user to enter a word (or anything really.) Upon
submission, the browser would load a URL with the word string appended at
the end in the current window. Please can anyone help?
James

Feb 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David | last post by:
Hi, I have an asp page which basically takes some data from a previous page form and inserts the data to my database and then does a re-direct to: Response.Redirect "JS_Create.asp" On this...
0
by: Dev Direct | last post by:
Dev Direct September News Round Up http://www.devdirect.com/content/newsletters/dev200409.htm Dev Direct provides an authoritative and up-to-date catalog of 1000's of developer tools and...
10
by: Alex Greem | last post by:
Dear all, Our database (DB2 Workgroup 7.2 FP12) is constantly under heavy load. Most time CPU usage (1 Pentium3 1Ghz) is more 50% busy. We have 3GB RAM memory Our normal workload is 200-300...
5
by: Nadav | last post by:
Hi, I am trying to get a direct pointer to the address of the screen ( something like 0x0b00 in the happy DOS days ), how can I do that? Should this be done in the kernel or it can also be done...
1
by: Mike | last post by:
Hi We are new to the world of ASP Development and I have a simple question - we are starting a test development in ASP 2.0 Beta and we are building an application using a Direct Connection to...
3
by: Tony | last post by:
At http://www.quirksmode.org/js/placejs.html I found a discussion on how & where to place your javascript. Toward the bottom of the page, PPK has a section titled Deprecated: Direct JavaScripts,...
3
by: john.enevoldson | last post by:
Hi, When running a job that inserts data into a particular table we are seeing a significant number of direct writes against the tablespace containing the table. This is the only table in the...
5
by: Remco van Engelen | last post by:
Hello, I have a question regarding the ISO C grammar. The syntax of a direct-declarator reads (section A.2.2, page 413 in my copy; the (R1) is just to 'name' the rule for later reference): ...
5
by: Rahul B | last post by:
Hi, I am having the following issues while trying to restrict the current user from creating any objects. Below is the privileges for the user and response when i try to create a table in that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.