Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
i need to get the value of a textbox that has been populated by a query string based on the value of another textbox that has also been populated by the same query string.
Posted
Updated 31-Aug-11 23:08pm
v2
Comments
_Zorro_ 1-Sep-11 4:53am    
I don't know if it's me but I'm having a hard time trying to understand your question...
OriginalGriff 1-Sep-11 5:12am    
It's not just you...
Rico_ 1-Sep-11 5:19am    
Guys , is the question still not clear enough ?
RaisKazi 1-Sep-11 5:23am    
Your Question is really unclear.

1 solution

I assume your question is a bit harder than just asking how to get a value from a textbox. If that's not the case, here's my answer based on what I understand (which I'm sure is wrong :P)...

String value = thePopulatedTextBox.Text;

It can't be that easy though...

Do you really mean query string? Because a query string by itself does not populate anything. Do you mean jQuery and the situation is that you can't get the value after the postback has occured?
 
Share this answer
 
Comments
Rico_ 1-Sep-11 5:40am    
String Team = Request.QueryString["Team"];
txtboxProdTeam.Text = Team;

The textboxes are getting populated like the above example. basically i need to find the value of the second textbox by what is populated in the first textbox.
_Zorro_ 1-Sep-11 5:56am    
"The textboxes are getting populated like the above example." Ok, that's clear.
"basically i need to find the value of the second textbox by what is populated in the first textbox." That's the part I don't get... What do you mean by the 'value of the second textbox by what is populated in the first textbox.' ?
Rico_ 1-Sep-11 6:08am    
ok. the 2 textboxes are getting populated. in textbox "1" there is text, also in textbox "2". Based on textbox "1" , i need the value of the text (value = ID) and also the value of textbox "2". In the database , textbox "2" is dependant on textbox "1" value. sorry for any confusion caused
_Zorro_ 1-Sep-11 6:14am    
Still confused... what's with the ID now? :)

You know how to set a value in the Text property, you know how to get a value from the querystring.

You're telling me you need the value of the textbox, the value is the Text property to me, if you're looking for the Control's ID, then just read it's ID property, or ClientID if you're looking for the unique client id.

I'm sorry having such a hard time to understand what you're asking....
Rico_ 2-Sep-11 1:45am    
hi , i have sorted out the issue i was facing. but i have somehow stumbled upon another issue. i im getting the value of text that is populated in the textbox but i do not know how to read it from the radiobutton control. Sorry for the late reply.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900