Asp.net和Ajax Controls popwindow添加按钮的代码隐藏不起作用 [英] Asp.net and Ajax Controls popwindow Add button's codebehind is not working

查看:58
本文介绍了Asp.net和Ajax Controls popwindow添加按钮的代码隐藏不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

在链接按钮上我弹出一个ModalPopup扩展器从用户bt中取一些值添加(按钮功能不起作用)并在同一个添加按钮上我需要打开另一个弹出窗口Ajax控件(模态弹出扩展器)显示GridView(显示来自Preivous弹出窗口的数据)及其提交按钮正在工作

解决方案

首先添加按钮工作是

 受保护  void  btnAdd_Click( object  sender,EventArgs e)
{

getMigrationDataView(); // 用于填充从虚拟表中的用户获取的值并放入gv
btnAddToShowGVModalPopup.Show ();

}





另一个Popup已保存以保存到正常工作的db


//第一个Modalpopup Extender

< asp:linkbutton id =lbtnrunat =servercausevalidation =falsexmlns:asp =#unknown>

onclick =lbtn_Click>添加您的迁移



< asp:modalpopupextender id =lbtn_ModalPopupExtenderxmlns:asp =#unknown >

PopupControlID =popupPanelBackgroundCssClass =modalBackground

runat =serverEnabled =trueDropShadow =trueRepositionMode =RepositionOnWindowResizeX =0Y = - 120

TargetControlID =lbtnMigrationPath>





< br $>




//第二个模态弹出扩展器

< asp:button id =btnAddrunat = servercssclass =labelxmlns:asp =#unknown>

onclick =btnAdd_ClickText =AddCausesValidation =False/>

< asp:modalpopupextender id =btnAdd_ModalPopupExtenderx = - 1000>

runat =serverDynamicServicePath =Enabled =TruePopupControlID =gvPanelDropShadow =trueBackgroundCssClass =modalBackground

TargetControlID =btnAdd>

hello
On link button i poping up a ModalPopup extender to take some values from user bt its add(button functionlity is not working) and on same add button i need toopen another popup window same with Ajax control(modal popup extender) to show a GridView(to show data from Preivous popup window) and its Submit button is working

解决方案

first Add button working is

protected void btnAdd_Click(object sender, EventArgs e)
        {
            
            getMigrationDataView(); // for filling values taken from user in dummy table and put       into gv
            btnAddToShowGVModalPopup.Show();
            
        }



on another Popup have save to save into db that is working fine


// first Modalpopup Extender
<asp:linkbutton id="lbtn" runat="server" causesvalidation="false" xmlns:asp="#unknown">
onclick="lbtn_Click">Add your Migration

<asp:modalpopupextender id="lbtn_ModalPopupExtender" xmlns:asp="#unknown">
PopupControlID="popupPanel" BackgroundCssClass="modalBackground"
runat="server" Enabled="true" DropShadow="true" RepositionMode="RepositionOnWindowResize" X="0" Y ="-120"
TargetControlID="lbtnMigrationPath">





// Second Modal pop up extender
<asp:button id="btnAdd" runat="server" cssclass="label" xmlns:asp="#unknown">
onclick="btnAdd_Click" Text="Add" CausesValidation="False" />
<asp:modalpopupextender id="btnAdd_ModalPopupExtender" x="-1000">
runat="server" DynamicServicePath="" Enabled="True" PopupControlID="gvPanel" DropShadow="true" BackgroundCssClass ="modalBackground"
TargetControlID="btnAdd">


这篇关于Asp.net和Ajax Controls popwindow添加按钮的代码隐藏不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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