Total members 9951 | Gratitudes |It is currently Sat Feb 11, 2012 9:27 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: Handle IsPostBack Condition
PostPosted: Wed Nov 05, 2008 6:35 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:47 pm
Posts: 281
Has thanked: 0 time
Have thanks: 1 time

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.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Handle IsPostBack Condition
PostPosted: Wed Nov 05, 2008 6:38 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:53 pm
Posts: 229
Has thanked: 0 time
Have thanks: 0 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


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Handle IsPostBack Condition
PostPosted: Mon Apr 20, 2009 7:05 pm 
Offline
Newbie
User avatar

Joined: Mon Apr 20, 2009 6:53 pm
Posts: 3
Has thanked: 0 time
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


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 How can a GUI component handle its own events  Java  AskBot  1
 handle integer overflows and underflows  Java  AskBot  1
 What are exceptions and how to handle them!!!  Java  tetosoft  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team