Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

ASPNET GridView and page question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason Huang - 12 Jul 2007 07:18 GMT
Hi,

In my ASPNET 2.0 web form WebForm1.aspx, I have a GridView GridView1 and
some other controls in front of the GridView1.
There are CheckBoxes on the GridView1 also.
My question is when I check the 20th row of GridView1's CheckBox, the
WebForm1 will autopostback, and the web page will go to top of the page, I
need to drag the scrollbar down or hit the PageDown so I will go the 20th
row.
That seems not convenient for users.
How do I fix that situation?   Thanks for help.

Jason
Masudur - 12 Jul 2007 07:32 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jason

Hi Jason......
since you are using asp.net 2.0....
you got a easy way to accomplish the job...
just set your page's

MaintainScrollPositionOnPostback property to true...

<%@ Page Language="C#" AutoEventWireup="true"
Codebehind="Login.aspx.cs" Inherits="KazBitoron.Login"
   MasterPageFile="~/Kazbitoron.Master"
MaintainScrollPositionOnPostback="true" %>

Just like this....

Thanks
Md. Masudur Rahman (Munna)
kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
marss - 12 Jul 2007 07:50 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jason

Read here:
http://msdn2.microsoft.com/en-us/library/system.web.ui.page.smartnavigation(vs.8
0).aspx


Regards,
Mykola
http://marss.co.ua
Masudur - 12 Jul 2007 08:02 GMT
> > Hi,
>
[quoted text clipped - 14 lines]
> Regards,
> Mykolahttp://marss.co.ua

Hi...

"
Version Information
.NET Framework
Supported in: 1.0, 1.1
Obsolete (compiler warning) in 2.0"

in asp.net 2.0 smartnavigation is obsolete...

maintainscrollpositiononpostback is new in asp.net 2.0

http://msdn2.microsoft.com/en-us/library/system.web.ui.page.maintainscrollpositi
ononpostback(VS.80).aspx


Thanks
Md. Masudur Rahman (Munna)
kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.