|
Anchor tag is your friend. Look at the named anchor tag. When you post to the page, pass the anchor tag and the page will scroll (automagically) on refresh.
Anchor Tag Help[^]
|
|
|
|
|
Thanks for the start..
I have 2 followup questions:
1) does that mean I have to put 'a name="[name of field]"' on every field that can be updated, including the dynamic fields?
2) how is the reference invoked upon refresh, please show code snippet?
Thanks again..
Chuck..
|
|
|
|
|
Ok, the general notion is that you add named anchor tags to your page, say something like
<a NAME="ID218395" HREF="#"><a>
notice the title for the anchor tag is blank, so it can not be seen by the user. If you want to be click-able then give it a title
<a NAME="ID218395" HREF="#">My Cool Link<a>
now call the page as
myCoolPage.aspx#ID218395
that is all.
|
|
|
|
|
I have the same prblems with my long page, pls is there no way
other than using the anchor tags?
thanks.
|
|
|
|
|
Enobong Adahada wrote: I have the same prblems
what is your prblems problems. speak up (properly) and you may be heard. What is wrong with the named anchor tag. I use it on very long page and a have plenty sprinkled though out the page.
|
|
|
|
|
Yusuf, this looks like something that will really work for me.
First I have never used anchors before so there a little be of confusion here on my part. This is an asp.net with vb.net as the code behind.
So when something is changed that causes a postback then the code behind is invoked. How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page?
So just to be clear I don't have a problem with creating a hundred anchors if necessary, it is just how to activate the appropiate anchor. If for example an entry from the travel dropdownlist is selected I will need to process the selection then redisplay the page. Upon selecting the dropdownlist theI will need to know its anchor. After exceuting the AutoPostBack routine I will want to return to the anchor for that dropdownlist location.
I hope I am not making this too complicated.
Thanks again..
Chuck..
|
|
|
|
|
MacIntyre wrote: First I have never used anchors before so there a little be of confusion here on my part.
Chris, don't feel bad. We're all there one day or another. We'd to start from zero.
MacIntyre wrote: This is an asp.net with vb.net as the code behind.
No matter what you are using, behind the scene, it will spit out HTML code. So, you need to hone your HTML knowledge. Anchor tags are one example.
MacIntyre wrote: How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page?
Well, what is causing the page refresh? Is it button click? or other user action? If it is button click then you need to add the anchored tag to your Response.Redirect() page.
If you give us some more detail about your code we may help you.
|
|
|
|
|
MacIntyre wrote: looks like something that will really work for me.
I wouldn't use it. It is cumbersome and unmaintainable.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Yusuf wrote: Anchor tag is your friend
Not in this situation. It is a cumbersome and unmaintainable mechanism for this usage
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Damn classic asp. You are right. I have being working on the classic asp lately and my memory is filled with that filth
|
|
|
|
|
Ok, so we have been through that exercise and discovered that for implementing asp.net that it is not practical to do this.
What is a more practical solution, remembering that this is webforms?
We are talking the use of both buttons and dropdownlists and exiting from fields that have changed..
Thanks again..
|
|
|
|
|
So will this work with all types of returns, field changes, button clicks and changes in dropdownlists?
|
|
|
|
|
Have you read the documentation?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
No sir. Not yet..
I was looking at the next message and inquiring?
Thanks..
|
|
|
|
|
Mark, Great Answer..
The only problem is the documentation on how to is a little obscure for those of use that did not go through the embedded asp wars.
But as you say a little research will get to the answer.
Thanks again for a great call...
Chuck..
|
|
|
|
|
pls i have this code
protected void Page_PreLoad(object sender, EventArgs e)
{
MaintainScrollPositionOnPostBack = true;
}
but the page still scrolls up when i click a button.
pls help.
|
|
|
|
|
Place the MaintainScrollPositionOnPostBack="True" statement in the Page directives at the top of the aspx page. I had to do additional searches to find how to use it. Works great for me so far in all cases..
Good luck..
|
|
|
|
|
Is there any tool available in the market to migrate an ASP.NET based application to Silverlight application?
Appreciate a quick reply.
|
|
|
|
|
Is there any thing useful for you here[^]
|
|
|
|
|
Hi,
I need to retrieve email address of a specified user from LDAP server.
IF i pass username & password displays emailid.
But i have only the username with this when i try to retrieve emailid displays "The specified domain either does not exist or could not be contacted."
I have googled & tried many options.
Whether any access rights is restricted.
beula.
|
|
|
|
|
Looks like right issue. One thing you can do, have an user with admin rights and use that creadentials to access the records in AD.So here you just need have one uname and password which is admin.
|
|
|
|
|
hi to all,
i am new in asp.net so i need some help from you all.
i have created menus using menucontrol, this menu control is on Index.apsx page of masterpage.
when i click on any menu it will show me the related aspx page, e.g :- if i click on "Add new hotel"
it will show me the Hotelentry.aspx page, but the menus will get disappeared because the menucontrol is on index.aspx not on master page.If i took menucontrol on masterpage it shows error that the menucontrol should be within Form tag.
i haven't used Form on masterpage i have used form in content pages of that masterpage.
if i use "form" in masterpage, i can't use that "form" again in content aspx pages.
so please give me solution on this.
actualy i want if user select any menu, the related aspx page will get displayed but the menus should also remains as it is...
please help me
|
|
|
|
|