Master page_enableeventvalidation「建议收藏」

Master page_enableeventvalidation「建议收藏」Masterpage/contentpagepostbackproblemHi,Ihavethefollowingscenario:Iamusingamasterpage(masterpage.master)whichcontainsatextboxandtwoImagebuttonsasservercontrols.Itriedsom

大家好,又见面了,我是你们的朋友全栈君。

Master page/content page postback problem

Hi,

I have the following scenario:

I am using a masterpage (masterpage.master) which contains a textbox and two Imagebuttons as server controls. I tried some non-input content pages using this master page and everything is OK.

However, I have recently added a new content page which consists of an <asp:Wizard> and its steps, one of which contains <asp:textbox>es and some validation controls. The problem I am encountering, is: if the initial value of the textbox(es) is, say “abc” (set in <asp:WizardStep> html), even if I type this value to say, “hello” (when running) and put a breakpoint in the content page’s Page_load to see the value
after postback, it is still given as “abc” (even though I have typed “hello” in the textbox(es)).

I also noticed incidentally that if I remove ‘EnableEventValidation=”false”‘ from the masterpage, I get “Invalid postback or callback argument” error.

What I do not understand is that if I remove the master page (or use a different page with the content pasted in and no masterpage included) the change is registered after postback.

Could anyone please help?

Thanks in advance,

Timothy

Reply With Quote
  #
2  
Old 12-13-2006, 06:02 AM
timmym
timmym is offline <script type=”text/javascript”> vbmenu_register(“postmenu_469327”, true); </script>
Registered User
 
Join Date: Jun 2004
Location: Malta, Europe
Posts: 50

Solved!

OK! Solved the problem…it was that the master page had a <form runat=”server”> and a redundant <form> (without the runat=”server”; which came from the template I used) deeper down, which when removed, made everything work correctly!

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163877.html原文链接:https://javaforall.net

(0)
上一篇 2022年7月24日 上午11:46
下一篇 2022年7月24日 下午12:00


相关推荐

  • DIKW体系

    DIKW体系source nbsp https zh wikipedia org wiki DIKW E4 BD 93 E7 B3 BBDIKW 体系 编辑 维基百科 自由的百科全书 DIKW 体系就是关于资料 Data 资讯 Information 知识 Knowledge 及智慧 Wisdom 的体系 当中每一层比下一层赋予某些特质 资料层是最基本的 资讯层加入内

    2026年3月19日
    2
  • C语言:三目运算符 “?”号

    C语言:三目运算符 “?”号三目运算符的表示一般为 该运算符连接 3 个对象 是 C 语言中唯一一个三目运算符 又称条件运算符 它的一般形式如下 表达式 a 表达式 b 表达式 c 其执行步骤如下 1 计算表达式 a 的值 2 如果表达式 a 的值为 1 则执行表达式 b 3 如果表达式 b 的值为 0 则执行表达式 c 注意 当有多个三目运算符时 按从右至左的顺序运算 例如 下面两个表达式是等价的 a

    2026年3月11日
    2
  • 简单的TCP客户端发包工具[通俗易懂]

    简单的TCP客户端发包工具[通俗易懂]一、TCP介绍先放这里有时间在写,最近在写DuiLib相关的使用内容,这部分大家凑活着看二、程序截图下载链接链接:https://pan.baidu.com/s/1MzNUzwd7WwBat6vNMcu6Ow密码:ibuv 主要源码://.h//TCPClient.cpp:定义应用程序的类行为。//#include"stdafx.h"#in…

    2025年9月20日
    7
  • python深度学习库系列教程——python调用opencv库教程

    python深度学习库系列教程——python调用opencv库教程全栈工程师开发手册(作者:栾鹏)python教程全解OpenCV安装pipinstall–upgradesetuptoolspipinstallnumpyMatplotlibpipinstallopencv-pythonOpenCV的结构和Python一样,当前的OpenCV也有两个大版本,OpenCV2和OpenCV3。相比OpenCV2,OpenCV3提供了

    2026年4月14日
    4
  • 即梦AI积分这样兑换!超详细步骤教程来了~

    即梦AI积分这样兑换!超详细步骤教程来了~

    2026年3月12日
    2
  • qnap系统安装_snailsvn安装配置教程

    qnap系统安装_snailsvn安装配置教程QNAP安装subversion服务器背景安装1.安装Entware2.安装Subversion配置1.创建仓库2.配置仓库启动svn1.杀掉已有的svn进程2.启动)背景买了一台QNAPTS-453Bmini。是x86的机器,性能强大,最高能装16G内存。某日偶然网上发现有人做svn服务器,于是打算试试。为啥不用Gitlab呢。因为发现Container的网络ip…

    2022年10月17日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号