Hai Friends我在Asp.Net上有一个关于Modelpoppup Box的问题 [英] Hai Friends I Have A Question On Modelpoppup Box In Asp.Net

查看:117
本文介绍了Hai Friends我在Asp.Net上有一个关于Modelpoppup Box的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个modelpopup框包含一个文本框

和ok,取消按钮。它类似于一个消息框。



当我点击确定按钮时,它会在该文本框中显示必填字段,即使该文本框包含正确的值。怎么了?如何使其可行

I have one modelpopup box contain one text box
and ok ,Cancel buttons. it is similar to a message box.

when ever i click on ok button it will show required field on that text box, even if that text box contains proper values. What am doing wrong? How can I make it workable

推荐答案

根据我对点击的理解,如果您想验证整个表格的确定按钮



如果是这样,你可以通过调用ModalPopupExtender属性中的客户端脚本函数来执行客户端验证



As per my understanding on click if the ok button you want to validate the entire form

if so you can perform client side validation by calling a client side script function in the ModalPopupExtender properties

<ajaxToolkit:ModalPopupExtender ID="MPE" runat="server"
    TargetControlID="LinkButton1"
    PopupControlID="Panel1"
    BackgroundCssClass="modalBackground"
    DropShadow="true"
    OkControlID="OkButton"
    OnOkScript="onOk()"
    CancelControlID="CancelButton"
    PopupDragHandleControlID="Panel3" />



< br $>


在哪里定义一个OnOk()java脚本并验证你的表格





否则,如果你想验证或执行服务器端操作,那么在你的目标控件里面使用html.beginform('actionname','controllername')



为了对该表单的确定执行操作。



希望它有所帮助




Where define a OnOk () java script and validate your form


Or else if you want to validate or perform server side operation then inside ur target control use html.beginform ('actionname','controllername')

In order to perform the action on ok of that form.

Hope it helps


这篇关于Hai Friends我在Asp.Net上有一个关于Modelpoppup Box的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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