发布形式,但没有张贴视图状态 [英] posting a form but without posting the viewstate
问题描述
我有一个Web表单,并希望'得到'到另一个页面..
反正是有提交不张贴视图状态和其他位,我不想?
或者我应该再追提交按钮点击了查询字符串重定向我自己建
i have a web form and want to 'get' it to another page.. is there anyway to submit it without posting the viewstate and other bits i dont want? or should i be catching the submit button click and redirecting with a querystring i build myself
感谢
推荐答案
您有几个选择这里:
- Disable ViewState
- Use jQuery to remove the fields you don't want to post before the are sent to the server
您不必在所有页面禁用ViewState的,只是你不关心保存状态的页面。
You don't have to disable ViewState on all pages, just the pages that you do not care for the state to be saved.
但也有禁用ViewState中完全如果你从来没有想用它的选项。
But there is also the option to disable the ViewState completely if you never want to use it.
如果你只是想自己组成一个GET,你可以使用jQuery为藏汉所以你只通过你真正想要的参数,它会给你一个什么样发布/ getted 100%的控制。
If you just want to compose a GET by yourself, you can use jQuery for that aswell so you only pass the parameters you really want which will give you 100% control of what is posted /getted.
这篇关于发布形式,但没有张贴视图状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!