I am struggling to figure out how to open a radwindow from my vb codebehind... I was able to get my window to open correctly by setting up an onclientclick event for a hyperlink but this is not what I want to do. I want to handle the serverside onclick event for a link button so that I can do some server side validation and then if the validation passes I will open the popup. Currently the code below is generating a jscript error "Object doesn't support this property or method". The weird thing is that this exact same javascript executed successfully when it was called from a hyperlink onclientclick event and that is why I am confused? Any thoughts?
This is the oldcode that executed succesfully... essentially calling the same jscript function from a hyperlink client onclick as opposed to a serverside linkbutton click...
Protected Sub lbSchedApt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbSchedApt.Click |
Dim jScript As String = [String].Format("openNewWindow('{0}', '{1}');", schedQID, ddlEvaluators.SelectedValue) |
Page.ClientScript.RegisterStartupScript(Me.GetType(), "ClientScript", jScript, True) |
End Sub |
function openNewWindow(schedQueueID, evaluatorID) { |
window.radopen("ScheduleAppointment.aspx?ScheduleQueueID=" + schedQueueID + "&EvaluatorID=" + evaluatorID, "SchedAppt"); |
return false; |
} |
<asp:linkbutton ID="lbSchedApt" runat="server">Make Appointment</asp:linkbutton> |
This is the oldcode that executed succesfully... essentially calling the same jscript function from a hyperlink client onclick as opposed to a serverside linkbutton click...
hlSchedApt.Attributes("href") = "#" |
hlSchedApt.Attributes("onclick") = [String].Format("return openNewWindow('{0}', '{1}');", datarow.Row.ItemArray(8).ToString(), ddlEvaluators.SelectedValue) |