Click here to Skip to main content
Sign Up to vote bad
good
See more: C#
hi all , i have Q :
i used this this method to Return my Value
  context.Response.Write(id.Tostring());
but i dont know how can I Get this value ,,
should i use this ,
context.Request.Params["id"].ToString();
?
plz help me Guys ! TnQ
Posted 3 Dec '12 - 4:43
mahmii272
Edited 3 Dec '12 - 10:33

Comments
ryanb31 - 3 Dec '12 - 11:28
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?
Arun1990 - 3 Dec '12 - 12:57
I don't understand the meaning of your question,plz explain it in proper way
Sergey Alexandrovich Kryukov - 3 Dec '12 - 12:57
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.
<input id="YourId" type="hidden" value="Your value goes here" />
Then in your code behind you can see this value like this
string yourValue = YourId.Value;
yourValue will equal "Your value goes here"...
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 464
1 Mahesh Bailwal 373
2 Maciej Los 215
3 CPallini 175
4 Aarti Meswania 173
0 Sergey Alexandrovich Kryukov 9,417
1 OriginalGriff 7,204
2 CPallini 3,933
3 Rohan Leuva 3,211
4 Maciej Los 2,743


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 3 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid