473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

HtmlAnchor

Is there a way to simulate clicking a HtmlAnchor in .NET Code?


Nov 21 '05 #1
2 1432
How about Response.Redirect("~\webform1.aspx#anchorname") ???

HTH,
Greg

"Gabe Garza" <ga*******************@sbcglobal.net> wrote in message
news:zv*****************@newssvr27.news.prodigy.co m...
Is there a way to simulate clicking a HtmlAnchor in .NET Code?

Nov 21 '05 #2
I figured out a way using RegisterClientScriptBlock() and adding JavaScript
code at the bottom of the HTML section that sets the anchor using
document.location.hash = anchorname;

Within the JavaScript that I added with RegisterClientScriptBlock() I set
'anchorname' to the anchor that I want to anchor too.

Once the page gets to the bottom of the HTML section, document.location.hash
= anchorname; gets called and the client's page will be adjusted to the
anchor.
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How about Response.Redirect("~\webform1.aspx#anchorname") ???

HTH,
Greg

"Gabe Garza" <ga*******************@sbcglobal.net> wrote in message
news:zv*****************@newssvr27.news.prodigy.co m...
Is there a way to simulate clicking a HtmlAnchor in .NET Code?


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Young | last post by:
I tried using BeautifulSoup to make changes to the url links on html pages, but when the page was displayed, it was garbled up and didn't look right (even when I didn't actually change anything on...
2
by: Jeff Johnson | last post by:
I'm dynamically generating HtmlImages that I want to wrap with an HtmlAnchor. How do I do this? JJ
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
1
by: Roger | last post by:
Hi: I'm trying to submit a form and go to an anchor point after processing form on the same page. Is this possible? How?
1
by: Jacob | last post by:
In the following code I'm making a list of links. When you click a link I want an event to be raised. I have inserted the Event-code in the bottom of this mail. When I click a link a postback is...
1
by: Lauchlan M | last post by:
Hi. I have an ASP.net project that works fine. I copied it to another project using the following steps: << (i) create a new VS.NET ASP.NET project.
1
by: Roshawn | last post by:
Hi, I have created a web user control that acts as a numeric pager on my page. It consists of a repeater controls and an HtmlAnchor control. Of course the HtmlAnchor is placed in the repeater's...
3
by: Leigh Webber | last post by:
I have an HTMLAnchor control on my aspx page. When it's not inside a repeater, it works fine. When I put it inside a repeater control, the handler never gets fired. I have a handler for the...
4
by: Jim Reynolds | last post by:
Hi, I am trying to implement a postback from a control with a textbox and anchor to perform a search. I cannot use link button due to javascript being turned off. Is there a way of implementing...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.