473,378 Members | 1,564 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,378 software developers and data experts.

accessing code behind

I Tried this, and my html code looks like

<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl='<%=
CreateHyperLink %>' >HyperLink</asp:HyperLink>

but the rendered code now looks like
<a id="HyperLink1" href="<%= CreateHyperLink %>" >HyperLink</a>
any other ideas ?

thanks
-ashish
Hans Kesting wrote:
"ashish" <as****@mailmenot.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Iam having following hyperlink html on a aspx page

<asp:HyperLink id="HyperLink1" runat="server" Width="264px"
Height="24px" NavigateUrl='<%# CreateHyperLink %>'


try this: <%= CreateHyperLink %>
(replace # with =)

>HyperLink</asp:HyperLink></TD>


where CreateHyperlink is a public function in code behind ...
but this function is not being called ...,

what i see on the rendered page is :

<a id="HyperLink1">HyperLink</a>

is it possible to acces code behind like this ?, any help would be
appeciated ..
tia
-ashish


Nov 18 '05 #1
1 898
ashish <as****@mailmenot.com> wrote in
news:us*************@TK2MSFTNGP11.phx.gbl:
I Tried this, and my html code looks like

<asp:HyperLink id="HyperLink1" runat="server"
NavigateUrl='<%=
CreateHyperLink %>' >HyperLink</asp:HyperLink>

but the rendered code now looks like
<a id="HyperLink1" href="<%= CreateHyperLink %>" >HyperLink</a>
any other ideas ?


Ashish,

You can do that assignment in the Page_Load event of the code behind
class:

private void Page_Load(object sender, System.EventArgs e)
{
HyperLink1.NavigateUrl = CreateHyperlink();
}
--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 18 '05 #2

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

Similar topics

3
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different...
0
by: msnews.microsoft.com | last post by:
Hi, IN ASP.NET PAGE I HAVE DEFINED THE DIV TAG AS FOLLOWS:I want to access the value in the code behind(c#) . <div align="left" autopostback = true class="clsTitle"...
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
5
by: Vinod Kumar | last post by:
Hi All, Can I access a Javascript function written in an ASP.NET from the codebehind (C#) of that page? If yes, kindly give the code snippet to do this. Thanks and Regards Vinod Kumar
1
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created...
3
by: Lynn | last post by:
Hello, I have some user controls on a page...one for the user to fill in name, address, etc., and the other for the user to fill in credit card information. I have built the user controls in...
2
by: shaun duke | last post by:
I have been researching this over the last two days without success. I have a number of ultility functions that I want to make available to all pages. The pages will all be using code behind so...
6
by: Martin Eyles | last post by:
Hi, I have a .aspx page which has a .ascx file included through the lines <%@ Register TagPrefix="aspcustom" TagName="menu" Src="Menu.ascx" %> and <aspcustom:menu id="Menu1"...
2
by: Devon | last post by:
An asp.net web page I was working on suddenly stopped accessing back end code when loading the page. Evening breakpointing at the page_load doesn't get reached. It was working fine one day, and...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.