Hello fellow programmers, Im a little confused right now on my coding so I am seeking your help. What I am trying to accomplish to execute my javascript from my master page on server side. Here is my code on javascript on show modal dialog (master page)
function OpenPopup() {
if (window.showModalDialog) {
window.showModalDialog("PopUp.aspx", "PopUp",
"dialogWidth:550px;dialogHeight:300px,window.location = window.location;");
window.location.reload();
} else {
window.open('PopUp.aspx', 'name', 'height=350,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
}
}
</script>
Now I am trying to execute my javascript on code behind here is my trial code but so far nothing is working. Please help
If e.CommandName = "cmdAdd" Then
Dim addimage As ImageButton = DirectCast(e.CommandSource.FindControl("ImageAdd"), ImageButton)
Dim coursecatId As String = addimage.CommandArgument
Session("AddChecking") = "1"
Session("AddCourseCatID") = coursecatId
Session("AddYear") = drpdwnYear.Text
Session("AddDiscipline") = DropDownList1.SelectedValue
Else
note that
addimage.attribute.add(...) is working but I have to double click which will kinda frustrate the user. I cannot use it on rowdatabound cause I need the sessions so what I really need is RegisterStartupScript.
thanks and more power