d窗
public static voID RegisterJqueryDialogScript(Page page,string dialogdivID,string Title,int wIDth,int height,bool autoOpen,string openTriggerClIEntID) { if (string.IsNullOrEmpty(Title)) Title = "Form"; var heightStr = string.Empty; var witdthStr = string.Empty; if (height > 0) heightStr = "height: " + height.ToString() + ","; if (wIDth > 0) witdthStr = "wIDth: " + wIDth.ToString() + ","; string script = @"$(function (){ $(‘#dialog:ui-dialog‘).dialog(‘destroy‘); $(‘#" + dialogdivID + @"‘).dialog( { Title: ‘" + Title + @"‘,autoOpen:" + autoOpen.ToString().Tolower() + "," + heightStr + witdthStr + @" closeText: ‘No‘,modal: true,resizable: false } ).parent().appendTo(‘form‘);});"; string scriptKey = "Open" + dialogdivID; if (autoOpen) ScriptManager.RegisterStartupScript(page,page.GetType(),scriptKey,script,true); else { ScriptManager.RegisterClIEntScriptBlock(page,true); var scriptTrigger = @"$(‘#" + openTriggerClIEntID + @"‘) .click(function () { $(‘#" + dialogdivID + @"‘).dialog(‘open‘); return false; });"; scriptKey += "Trigger"; ScriptManager.RegisterStartupScript(page,scriptTrigger,true); } }
Open a user control in a pop up 总结
以上是内存溢出为你收集整理的webform将一个usercontrol作为模态框在page上d出全部内容,希望文章能够帮你解决webform将一个usercontrol作为模态框在page上d出所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)