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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • imb服务器怎么拆硬盘,IBM P750更换本地硬盘

    imb服务器怎么拆硬盘,IBM P750更换本地硬盘1、确认故障主机报警和硬盘ERPES01@/>errpt-dH|moreIDENTIFIERTIMESTAMPTCRESOURCE_NAMEDESCRIPTION80D3764C0301180416UHLVDDPVNOLONGERRELOCATINGNEWBADBLOCKSE86653C30301180416PH…

    2022年6月29日
    46
  • 对LARS(Least Angle Regression)的简单理解

    对LARS(Least Angle Regression)的简单理解前言我在本科的时候接触过用LASSO筛选变量的方法,但了解不多。这几天在公司实习,学习到特征选择,发现还有个LARS是经常和LASSO一起被提起的,于是我临时抱佛脚,大概了解了一下LARS的原理。在看文章的时候发现很多人提到SolutionPath这样一个概念,感觉很费解,后来参阅了Efron等人的&quot;LeastAngleRegression&quot;论文,总算是明白了一些。不过本人由于懒,后面数学…

    2022年6月20日
    31
  • python 进制转换[通俗易懂]

    python 进制转换[通俗易懂]文章目录前言一、Python提供的进制转换方法1.二进制转十进制2.八进制转十进制3.十六进制转十进制4.十进制转十六进制5.十进制转二进制6.十进制转八进制二、自定义进制转换1.转十进制2.十进制转七进制总结前言十进制是我们常用的数字形式,但机器使用的却是二进制,八进制,十六进制之类的,所以进制转换是基础要求,很多编程语言提供的有进制转换的方法,下面我们开始学习一、Python提供的进制转换方法1.二进制转十进制s=’1001’print(int(s,2))结果如下:in..

    2022年5月12日
    55
  • latex怎样绘制表格_LaTeX排版

    latex怎样绘制表格_LaTeX排版latex在线生成表格的网站:http://www.tablesgenerator.com/latex_tables这个网站可以通过三种方式来生成latex表格代码:1、自己设置表格;2、直接导入csv表格;3、直接复制表格内容1、自己设置表格点击File,选择newtables,可以设置需要的行列数2、点击importcsvfile,可以直接导入3、 点击…

    2022年8月11日
    16
  • Bootstrap表格示例

    Bootstrap表格示例效果图如下:代码如下:

    2025年6月2日
    2
  • xsync集群分发脚本的改良[通俗易懂]

    xsync集群分发脚本的改良[通俗易懂]集群分发脚本xsync带多参数1.0增强了一下带参个数xsync1.0#!/bin/bash#校验参数pcount=$#if(($pcount==0))then exitfi#获取用户名user=`whoami`#获取文件名,路径for((i=1;i<=$#;i++))#对多个传参进行分析dob=${!i} #这里用到了“间接变量”语法fname=`basename$b`dname=`dirname$b`dir=`cd$dname;pwd`

    2022年6月1日
    33

发表回复

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

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