如何获得Response.write方法的答案 [英] how to get the answer of Response.write method

查看:143
本文介绍了如何获得Response.write方法的答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有Q:

i使用此方法返回我的价值

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帮帮我伙计! TnQ

?
plz help me Guys ! TnQ

推荐答案

Response.Write只是将一个文字字符串输出到转发到客户端的响应流。

如果你需要这个值通过请求流返回,那么你需要将它添加到你的html和表单中,以便你可以从表单数据中提取它稍后服务器。

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将等于你的价值在这里......


yourValue will equal "Your value goes here"...


这篇关于如何获得Response.write方法的答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆