Public Sub ShowDialog(texto As String) Dim Properties As New Models.DialogProperties() With {.Title = "Prueba", .Content = texto, .EnableModal = True, .IsResponsive = True, .ShowOnInit = True, .CloseOnEscape = True } Dim DialogToShow As New Dialog("dr" & DateTime.Now.Ticks.ToString, Properties) DialogToShow.Render() End Sub
ksk
But I have this error
[NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.] Syncfusion.JavaScript.HtmlTag.Render(TextWriter writer) +73 Syncfusion.JavaScript.Dialog.RenderControl(String controlId) +26 Syncfusion.JavaScript.Dialog.CreateUnObtrusiveContainer(String controlId) +10 Syncfusion.JavaScript.Control.Render() +58 VivirOnline.Utilitarios.ShowDialog(String texto) in C:\Users\ovega\Source\Workspaces\VivirOnline\VivirOnline\App_Code\Utilitarios.vb:399 VivirOnline.Login.Button1_Click(Object sender, EventArgs e) in C:\Users\ovega\Source\Workspaces\VivirOnline\VivirOnline\Account\Login.aspx.vb:83 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9659822 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.<ProcessRequestMainAsync>d__1.MoveNext() +5911
Was I'm wrong???
Hi Oscar,
Thanks for contacting Syncfusion Support.
The reported issue will occur if the object returns null value as the result. We have to create and set the required properties to the Dialog control and then add it to the page / corresponding element as highlighted in the following code snippet.
<code>
Protected Sub ShowDialog(Sender As Object, e As Syncfusion.JavaScript.Web.ButtonEventArgs)
Dim dial As New Syncfusion.JavaScript.Web.Dialog()
dial.ShowOnInit = True
dial.IsResponsive = True
dial.Title = "Preua"
contentdiv.Controls.Add(dial)
End Sub
</code>
For your convenience we have prepared a sample to create Dialog in server side and the same can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/120903/ze/ASPDialogVBServer-174482161
Kindly check with the above sample. If still you face the problem then please revert us by modifying the sample along with the replication procedure in which we can able to reproduce the issue in our end.
Regards,
Saranya.S