|
-
Jul 28th, 2005, 05:14 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Prevent Page from Refreshing
Hi,
i have a datatable which i populate with table data in the pageload event
i only want this to populate once, so i have it inside an IF Not IsPostBack
but if i click on a button on the form it refreshes the page and the data is lost.
how can i prevent this from happening.
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Jul 28th, 2005, 05:21 AM
#2
Frenzied Member
Re: Prevent Page from Refreshing
Put it into ViewState or even better the Cache.
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
Jul 28th, 2005, 05:32 AM
#3
Thread Starter
Fanatic Member
Re: Prevent Page from Refreshing
how do you use the view state
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Jul 28th, 2005, 06:51 AM
#4
Re: Prevent Page from Refreshing
Type ViewState.add( into your IDE and you'll see what to do. It's very intuitive.
-
Jul 28th, 2005, 07:43 AM
#5
Thread Starter
Fanatic Member
Re: Prevent Page from Refreshing
i think ill cache it, seems to be better for what i need to do.
thanks for the help as always guys
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|