我有一个用户控件,在母版页中有一个下拉菜单,一个文本框和一个搜索按钮。我在下拉列表中选择一个值,在文本框中填入文本并点击按钮。在按钮上单击它重定向到另一个页面,但所有值都重置。如何获取下拉菜单中选定的值以及重定向页面中的文本?Usercontrol not retention value
0
A
回答
0
您需要将值发布到其他页面。例如,您可以通过值在URL中
redirectedUlr.aspx?value1=1&value2=2 etc...
或者你可以在会话存储值
Session["passedvalues"] = YourValues
他们是来处理页面之间的这种
0
可以传递信息的几个方法以各种方式,其中一些取决于重定向如何发生。即使源页面位于与目标页面不同的ASP.NET Web应用程序中,或源页面不是ASP.NET网页,也可以使用以下选项:
- 使用查询字符串。
- 从源页面获取HTTP POST信息。
以下选项仅在源页面和目标页面位于同一ASP.NET Web应用程序中时可用。
- 使用会话状态。
- 在源页面中创建公共属性并访问目标页面中的属性 值。
- 从 源页面中的控件获取目标页面中的控制信息。
欲了解更多信息和例子,你可以阅读下面的文章: http://msdn.microsoft.com/en-us/library/6c3yckfw(v=vs.100).aspx
相关问题
- 1. Octopack retention
- 2. IE.Document.getElementsByName(“name”)。Value =“Value”not working [VBA]
- 3. WPF Usercontrol Items not showing
- 4. WPF UserControl Not Displaying
- 5. Excel:Lookup Value not recognized
- 6. UserControl Property Binding not Working
- 7. textarea does not return value
- 8. asp.net textbox value not changing
- 9. document.getElementById(“ID”)。value not working
- 10. JavaScript getElementByName()。value not working
- 11. C#引用VB UserControl not found
- 12. React Mobx not rendering the value
- 13. Javascript selected items value not pull correctly
- 14. setItemChecked(int position,boolean value)not working?
- 15. UPDATE float value not posting to database
- 16. Django Dynamic Formset:Submit Value not Cloned
- 17. plist value not displayed in tableview
- 18. Items.Restrict Received Count not returned correct value
- 19. document.getElementById('TextBox1')。value is not working
- 20. WPF - Usercontrol as ListItemTemplate not fill listbox width
- 21. 是否在性能上有差异:not([attr =“value”])和[attr!=“value”]?
- 22. angular.isUndefined(value)和not!(value)之间的区别是什么?
- 23. Laravel 4:Hash :: make not returned a proper value
- 24. mysql php connector not returns last cell value
- 25. Javascript object not variable value with variable key
- 26. “Value can not be null。Parameter name:s”2Checkout payment API
- 27. why var returnText = value as string not working?
- 28. $ scope scope value can not read in controller
- 29. std_logic vector(15 downto 0)value not get assigned
- 30. asp.net unchecked checkbox pass not value as NULL