Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I would like my application to always call the page_load when loading this page

SearchBillType.aspx


VB
Imports System.Data
Imports System.IO
Imports System.Xml
Partial Class SearchDiagnosis
    Inherits PageBase
    Implements IPostBackEventHandler
    Shadows IsCallBack As Boolean = False
    Dim MAFunctions As New MAFunctions

VB
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     LoadBillType()     If IsPostBack AndAlso Request.Form("__AsyncPost") IsNot Nothing AndAlso Request.Form("__AsyncPost") = "true" Then
         IsCallBack = True
     End If
     If Not IsPostBack And Not IsCallBack Then
         If Not Session("BillTypeSelected") Is Nothing Then
             Session.Remove("BillTypeSelected")
         End If
     End If
 End Sub



This code only gets called the first time my application loads this page.

The following is a snipet from my Main page showing the Javascript code which calls the SearchBillType Page

XML
<script type="text/javascript">
     var clientid = "";
     var clientname = "";
     function ShowModal(Mode, Width, Height) {
         var browserName = navigator.appName;
         switch (Mode.toLowerCase()) {
             case "billtype":
                 var modalResult = window.showModalDialog(
                        "SearchBillType.aspx",
                        "resizable:no;scroll:yes;status:no;",
                        "dialogWidth:" + Width + ";dialogHeight:" + Height + ";center:yes"
                         );
                 document.getElementById("<%=btnParentChild.ClientId%>").click();
                 break;
            }
     }



Thank you.
Posted

1 solution

hi .
your code is wrong
please rewrite it .
 
Share this answer
 
Comments
Anthony Mushrow 29-Aug-11 21:59pm    
Would you be able to elaborate on what is wrong with the code? I assume the OP already knows that there is something wrong so this answer doesn't really help.
Sergey Alexandrovich Kryukov 29-Aug-11 23:16pm    
Your answer is wrong. Please rewrite it. :-)
--SA
Abhijit Jana 29-Aug-11 23:43pm    
You should mentioned what is wrong. And that is why he is here

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900