I have a relatively long page with a number of webcontrols with
"autopostba ck" set to true. The contents/items/datasources of the subsequent
webcontrols are dynamically populated depending on the selection of previous
webcontrols' selected item.
My question is : everytime the user selects an option from a webcontrol, due
to the autopostback being turned on, the page refreshes itself to populate
the subsequent controls. The problem I have is that when it refreshes, it
always ends up showing the top of my very long page.
Are there anyway i could somehow return to the location of the last selected
control that triggered that event or the next control after that? Anchors
does not work here, does it? If not, then how do i do it?
Please help! 4 3303
Hi,
Turn the smartnavigation on. http://msdn.microsoft.com/library/de.../en-us/cpref/h
tml/frlrfsystemwebu ipageclasssmart navigationtopic .asp
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Add the following to the page directives, it works for ie5 and above maybe
others
<%@Page ... SmartNavigation ="true"%>
"Jesse" <je******@hotma il.com> wrote in message
news:eU******** ******@tk2msftn gp13.phx.gbl... I have a relatively long page with a number of webcontrols with "autopostba ck" set to true. The contents/items/datasources of the
subsequent webcontrols are dynamically populated depending on the selection of
previous webcontrols' selected item.
My question is : everytime the user selects an option from a webcontrol,
due to the autopostback being turned on, the page refreshes itself to populate the subsequent controls. The problem I have is that when it refreshes, it always ends up showing the top of my very long page.
Are there anyway i could somehow return to the location of the last
selected control that triggered that event or the next control after that? Anchors does not work here, does it? If not, then how do i do it?
Please help!
"Jesse" <je******@hotma il.com> wrote in message
news:eU******** ******@tk2msftn gp13.phx.gbl... I have a relatively long page with a number of webcontrols with "autopostba ck" set to true. The contents/items/datasources of the
subsequent webcontrols are dynamically populated depending on the selection of
previous webcontrols' selected item.
My question is : everytime the user selects an option from a webcontrol,
due to the autopostback being turned on, the page refreshes itself to populate the subsequent controls. The problem I have is that when it refreshes, it always ends up showing the top of my very long page.
Are there anyway i could somehow return to the location of the last
selected control that triggered that event or the next control after that? Anchors does not work here, does it? If not, then how do i do it?
To make a workaround in other browsers apart from IE5 and 6, you could
think of inserting a numbered bookmark with each control:
<a name="bookmark0 1"> </a>
Then, on postback, insert a script to go to the right bookmark:
Sub InsertScriptBlo ck()
Dim jScript As new System.Text.Str ingBuilder()
jScript.Append( "<script language='JavaS cript'>")
jScript.Append( "location.href= '#bookmark01';" )
jScript.Append( "</scr" & "ipt>")
Me.RegisterClie ntScriptBlock(" Bookmark", jScript.ToStrin g())
End Sub
--
Jos Branders
Thank you Natty Gur!
Thank you Jason Turim!
Thank you Jos Branders!
You guys just saved my life!!!
"Jesse" <je******@hotma il.com> wrote in message
news:eU******** ******@tk2msftn gp13.phx.gbl... I have a relatively long page with a number of webcontrols with "autopostba ck" set to true. The contents/items/datasources of the
subsequent webcontrols are dynamically populated depending on the selection of
previous webcontrols' selected item.
My question is : everytime the user selects an option from a webcontrol,
due to the autopostback being turned on, the page refreshes itself to populate the subsequent controls. The problem I have is that when it refreshes, it always ends up showing the top of my very long page.
Are there anyway i could somehow return to the location of the last
selected control that triggered that event or the next control after that? Anchors does not work here, does it? If not, then how do i do it?
Please help!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steven |
last post by:
I create the checkboxes dynamically on my webform (aspx). after I create
them, when I check any of the checkboxes, nothing happens. Here is my code
...
ArrayList LayerNameList1 = LayerNameList;
CheckBox checkBoxArray;
int BoxCount = 0;
HtmlTableRow newRow;
HtmlTableCell FieldCell;
|
by: Lloyd Sheen |
last post by:
I have a page that works fine. I am trying to optimize the page by
overriding some of the Information that is being saved in the hidden
VIEWSTATE.
If I make the properties of the dropdown False for ViewState and True for
AutoPostBack, it does reload the page but does not call the
SelectedIndexChanged event. If I put the ViewState to True then it is
called.
Does this mean that I cannot get that event and deal with it in better code
|
by: Matthew Louden |
last post by:
why need to set autopostback property to be true?? I know autopostback event
means to send the form to the server automatically.
I tried checkbox, checkbox list, radio button, and radio button list, and
they all need to set autopostback property to be true, in order to make the
event of the control fires.
I know this is the must, but I dont know why. Please advise!
Thanks!
|
by: Mike Collins |
last post by:
I cannot get the correct drop down list value from a drop down I have on my
web form. I get the initial value that was loaded in the list.
It was asked by someone else what the autopostback was set to...it is set to
false.
Can someone show me what I am doing wrong and tell me the correct way? Thank
you.
In the page load event, I am doing the following:
|
by: postings |
last post by:
Hi
I have problems with autopostback and the gridview control. Please
continue reading.
The code below turns a row red when a tickbox is ticked in
edititemtemplate. Note autopostback on the tickbox is enabled and the
code works perfectly.
-------------------------------------------------------------------------------------------------------------------
| |
by: rn5a |
last post by:
Assume that a user control has a TextBox (Page1.ascx)
<asp:TextBox ID="txtName" runat="server"/>
I am encapsulating the above user control in a ASPX page named
Page1.aspx i.e. the ASPX page displays a single TextBox. There's also a
CheckBox in this ASPX page within the <formtags. Note that the
CheckBox IS NOT a part of the user control. It has been explicitly
added to the Form existing in the ASPX page. The AutoPostBack property
of...
|
by: andy |
last post by:
Hi,
I have a form uses several dropdownlists to narrow a set of criteria.
( This is in turn used to control what is shown on a gridview. )
With each, the user selects an entry and then the next dropdownlist
uses that control's selected value to drive what it shows.
They're all set to autopostback.
Everything works fine except where one of the levels only has one
entry.
This seems to mess up the next level down and you see the wrong
|
by: Peter |
last post by:
ASP.NET 2.0
Visual Studio 2008
I have the following code and when the textbox displays and I press Enter
while in the text box I get AutoPostBack, how do I stop AutoPostBack?
TextBox txt = new TextBox();
txt.MaxLength = parm.MaxLength;
txt.ID = parm.ParameterNameID;
txt.Text = "12345";
|
by: Chris |
last post by:
Hi,
When choosing a value in the dropdownlist, i try to put that selectedvalue
in the label, but i always get the first value 'a'.
EnableViewState is by default set to true, so ... what's wrong in my code?
Thanks
Chris
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
|
by: shashi shekhar singh |
last post by:
Respected Sir,
I have to create multiple dynamic dropdownlist boxes and add items dynamically in <asp:table> server control but problem occurs , i.e. except of fist dropdown list no dropdownlist boxes are generating a postback.here is a code .
protected void Page_Load(object sender, EventArgs e)
{
int selected_question = (int)Session;
if (!Page.IsPostBack)
{
display_blueprint();
string...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |