Switch to full style
You can find discussions, solutions and codes related to ASP.NET
Post a reply

Handle IsPostBack Condition

Wed Nov 05, 2008 6:35 pm

I'm New in ASP.net, I got a problem with ispostback condition where
in my database project i have a datagrid and every events
"PageIndexChanged" and "Sort_command" my webForm always do a postback
and the result all my SELECT condition in changed/back to first
condition/Page Load Condition...


how to keep that select condition even on page index changed and sort
command events.



Re: Handle IsPostBack Condition

Wed Nov 05, 2008 6:38 pm

If I remember correctly, you need to wrap your function in an if
condition, like

if not isPostBack
~do whatever~
end if

u check this code i think it is use ful for u
Code:

Dim strDomain() As String

Dim strConn() As String

Dim strConn2() As String

Dim strDocMain() As String

Dim strPrPath() As String

ReadConfig(strDomain, strConn, strConn2, strDocMain, strPrPath)

DHLConn2.ConnectionString = strConn2(0)

If Session("OPCTY") = "ED" Or Session("OPCTY") = "NEW" Then

btnCtySave.Visible = True

Else

btnCtySave.Visible = False

End If

If Page.IsPostBack = False Then

If Session("LoginUser") = "" Then

Response.Write("<script language=javascript> window.parent.location.replace
('../eprocurement');</script>")

End If

GetCurr()

Session("CtyCode1") = ""

Session("CtyDesc1") = ""

Session("CtyRegion1") = ""

Session("CtyCurr1") = ""

DataCurrency.Fill(DhlCurrency1)

DHLRegion.Fill(DhlRegion1)

cboCurr.DataBind()

cboRegCode.DataBind()

Session("opMode") = "0"

GetRegcode()

End If

Session("opMode") = "0"

Label1.Text = LocRM4.GetString("CountryCodeLabel")

Label2.Text = LocRM4.GetString("CountryDescLabel")

Label3.Text = LocRM4.GetString("CountryRegCodeLabel")

btnCtySave.Text = LocRM4.GetString("CountryButtonSave")

End Sub


Re: Handle IsPostBack Condition

Mon Apr 20, 2009 7:05 pm

this code does working in the net.how to hide my ip address.do you have any code for creat my own crm for one website
____________________________
Medical wound Dressings
Heel Pain

Post a reply
  Related Posts  to : Handle IsPostBack Condition
 What are exceptions and how to handle them!!!     -  
 How can a GUI component handle its own events     -  
 Handle Cookies using JQuery     -  
 handle integer overflows and underflows     -  
 Handle Focus events with FocusListener     -  
 Handle Key event-keyboard-Get typed Character and its code     -