Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi all , i have Q :
i used this this method to Return my Value
C#
context.Response.Write(id.Tostring());

but i dont know how can I Get this value ,,
should i use this ,
C#
context.Request.Params["id"].ToString();
?
plz help me Guys ! TnQ
Posted
Updated 3-Dec-12 10:33am
v2
Comments
ZurdoDev 3-Dec-12 11:28am    
Response.Write is writing the value to the response, which usually will mean that it will be printed on the users screen. Can you explain better what you are trying to do because this doesn't make much sense?
Arun kumar Gauttam 3-Dec-12 12:57pm    
I don't understand the meaning of your question,plz explain it in proper way
Sergey Alexandrovich Kryukov 3-Dec-12 12:57pm    
The question just makes no sense. Probably it is based on some misconception; but we don't know what was your thinking. A client sends HTTP request and received HTTP response, as defined by HTTP protocol. Learn about it. If a Web browser does it, you don't have to write any code to "get this value"; it is already done. If you need to write some client-side application other then a browser, ask about it, I'll tell you how to do it...
--SA

1 solution

Response.Write just ouputs a literal string to the Response Stream going to the client.
If you need this value to come back through the Request Stream then you'll need to add it something like this into your html and within your form so that you can pull it from the form data on the server later.
HTML
<input id="YourId" type="hidden" value="Your value goes here" />

Then in your code behind you can see this value like this
C#
string yourValue = YourId.Value;

yourValue will equal "Your value goes here"...
 
Share this answer
 

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