Total members 11895 |It is currently Mon Dec 30, 2024 6:38 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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.




Author:
Proficient
User avatar Posts: 280
Have thanks: 1 time

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


_________________
Please recommend my post if you found it helpful


Author:
Proficient
User avatar Posts: 228
Have thanks: 0 time

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


Author:
Newbie
User avatar Posts: 3
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  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 Focus events with FocusListener     -  
 handle integer overflows and underflows     -  
 Handle Key event-keyboard-Get typed Character and its code     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com