Hi
I want to show a modal dialog page in my application, I am using ASP.NET 2.0, AJAX and VB.Net.
I have a page that uses a master page, and I need to call a page as a modal page, but I don't know what is missing because I try in several ways and I didn't get it works.
I am using AJAX Extensions and may be it can be causing problems to runing the scripts.
This is the html code for calling the modal:
<%@ Page Language="VB" MasterPageFile="~/MAIN.mas
ter" AutoEventWireup="false" CodeFile="pagRsgSemicuanti
tativo.asp
x.vb" Inherits="pagRsgSemicuanti
tativo" title="Análisis de riesgo " %>
<%@ MasterType VirtualPath="~/Main.master
" %>
<%@ Register Assembly="AjaxControlToolk
it" Namespace="AjaxControlTool
kit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Cont
entPlaceHo
lder1" Runat="Server">
<script type ="text/javascript">
function ventanahija(pagina,nombre,
tamanos)
{
var val=window.showModalDialog
(page, name, size);
}
</script>
<cc1:ToolkitScriptManager runat="server" EnableScriptGlobalization=
"true" EnableScriptLocalization="
true" ID="ScriptManager1" ></cc1:ToolkitScriptManage
r>
:
This is the vb code:
Protected Sub CallPageMD()
Dim page As String = "pagParametrosAD.aspx"
Dim name As String = cmbRegion.SelectedItem.Tex
t.Trim()
Dim size As String = "dialogWidth:826px;dialogH
eight:565p
x"
Dim script As String = "<script language='javascript'>vent
anahija('"
& page & "', '" & name & "', '" & size & "');</script>"
'Page.ClientScript.Registe
rStartupSc
ript(Page.
GetType, "pagParamMD", script)
ScriptManager.RegisterStar
tupScript(
Me, Me.GetType(), "pagParamMD", script, True)
End Sub
I already tryied with Page.ClientScript .RegisterStartupScript and ScriptManager.RegisterStar
tupScript,
but I dont get to show the modal page.
Thanks in advance for your help.
Start Free Trial