PREVENTING POSTBACKS OR SETTING FOCUS ON CORRECT CONTROLS ACROSS POSTBACKS
Hi Paddy,
If there are certain things that you need to do at server side on
selection of DropDownList and you anyways want the postback then the focus
to the same control on which the user was working on can be achieved by
SmartNavigation property of ASPX page. You can just go ahead and set the
property SmartNavigation="true" in the page directive of your page which
will maintain the focus across postbacks.
warm regards
Vishal Joshi
Asst. Convener - CNUG | Microsoft MVP
If You Think YOU CAN... You Can...
Hi Paddy,
Set the "AutoPostBack" property of the DropDownlist to false and the
page should not post back on any client side interaction with drop down. By
default this property is false check what is its value now.
Alternatively you can avoid postback using client side Jscript function
activated on selection on dropdownlist. You just need to return false in
the JScript function. But setting "AutoPostBack" property is the correct
way of doing it.
warm regards
Vishal Joshi
Asst. Convener - CNUG | Microsoft MVP
If You Think YOU CAN... You Can...
-----Original Message-----
From: Paddy1010762003
To: Chennai .NET User Group
Sent: 8/21/03 4:05 AM
Subject: Page refresh problem in asp.net
Hi guys,
here is the scenario...I have data entry screen developed in asp.net
with lot of info on the screen. I need to scroll down the screen to see
the whole information on the screen. This cannot be avoided as i need to
populate lot of information on the screen. I have a combo box web server
control displayed at the bottom of the screen To see the combox box
control , i need to scroll down the screen. When an event occurs in the
combo box, say i choose a value in the combo box, the page gets
refreshed becos of post back mechanism and goes to the top of the page.
As a user , it is very annoying everytime i click on the combox , the
page goes to the top . Is there anyway out in asp.net to avoid this kind
of problem. Please suggest.
No comments:
Post a Comment