.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Hyperlink Click - Node Click.

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

I am using a treeview control as below. There is a Node text and please notice, I append a hyperlink next to the Node text. When I click on the hyperlink, I would like it to behave exactly like when I click on the node text. How can I do this? Right now, Node Click triggers custom code and when I click on the hyper link text, I want the same code to run. Thanks for your help in advance.

<asp:TreeNode Text="Text1 <a href='>Add</a>" Value="1" Expanded="False">
                                <asp:TreeNode Text="sdfsd" Value="0"></asp:TreeNode>                              
                                <asp:TreeNode Text="sdfsd" Value="1"></asp:TreeNode>
                                <asp:TreeNode Text="sdfsd" Value="2"></asp:TreeNode>

View Complete Post

More Related Resource Links

Open PDF file on button click or hyperlink from asp.net

I want to open a .PDF file on button click or hyperlink. please help me.

Hyperlink click event

hi, can any one help me how to implement click event for hyperlink as I am using hyperlink to logout the application and need to write the logout code in the event. For some reasons I am not able to use linkbutton.   Thanks in advance. 

WPF Hyperlink.Click Problem



I have a small problem that I am trying to solve - I'd appreciate your suggestions for which I thank you in advance.

Before I post my code to run under the hyperlink event I tested it with a Console.Writeline("Clicked") test. And to my surprise it lists the result twice. Probably due mouseclick events (Down and Release). My question is: Is there a proper way to code the Hyperlink.Click event to fire only once.

I use a frame in my main.xaml that is loading page1.xaml. In page1.xaml I host a label element containing a hyperlink. (Navigate with a hyperlink instead of using a button). The Element <label> is hosted in an expander (not that this is relevant - I hope). See Code Block below.

        <Label x:Name="lblRemoveMember" Margin="6,28,0,0" HorizontalAlignment=&q

Click event for hyperlink using Reportviewer for web forms


hello frnds

i am developing a web site in asp.net using visual studio 2010

i am developing reports using reportviewer and .rdlc file

i have added a hyperlink column in my report. 

i have set URL as "http://localhost/webform2.aspx" and it works fine. but

when i deploy web site on my server i have to change my url from "http://localhost/webform2.aspx" to "http://www.domainname.com/webform2.aspx".

there are many reports in this website so every time changing this url from localhost to domain name is very hectic

so i want click event for that hyperlink or any other solution is also appreciated



How to display data when i click on treeview node?



I have xml file like this

<?xml version="1.0" encoding="utf-8"?>
    <Version Value="FIX.4.0">
      <Security Type="EQUITIES">
        <TestSuite Id="1" Name="TS_ACK" Condition="$55='IBM'" Enable="True" IsBuiltIn="True">
          <VegaMessage Type="EX_ACK">
            <VegaField Tag="39" Value="www" Name="OrderStatus" />
            <VegaField Tag="56" Value="fdgdfg" Name="Target" />
            <VegaField Tag="11" Value="hh" Name="ClientOrderID" />
            <VegaField Tag="167" Value="ytyr" Name="SecurityType" />
            <VegaField Tag="38" Value="123&q

Dynamic hyperlink controls in button click event


Hi, i am creating a visual webpart in which when button is clicked dynamically hyperlinks must be displayed

In my senario i am having textbox,button,repeater control,when i enter url in textbox and click the button,hyperlink must be dynamically created and displayed in repeater control

i am not able to do this

thank you


GridView Javascript Click Row and Ajax

This article shows 2 common tasks with the ASP.NET GridView: Binding a List (generic) of objects as DataSource and on clicking a row, getting the values of the selected row by a javascript function. In the example a List with User-objects is displayed. On clicking a row containing the data of a User-object, the Id of the object is used to get the address of the user by an Ajax-call and display it in a details-field.

>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

jquery anchor click


looking for confirmation that using jquery to click an <a> element does not simulate the click of the link like it does in the object returned by getElementById.

<a id="anchor1" href="http://www.google.com">google</a>

// this does not click the link.
var x2 = $('#anchor1');

// this does click the link.
var x3 = document.getElementById('anchor1') ;
x3.click( ) ;

// this syntax returns the DOM object for the anchor element which can be clicked to redirect to the link.
var x4 = $('#anchor1') ;
var x5 = x4[0] ;
x5.click( ) ;


Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page


how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services


Thanks in advance

Button click in master page use in other pages I have to click twice. Why?


In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?

Browser window is opening up on the second click with javascript code



I am trying to set a javascript code to open up a new browser window with this URL that exists like shown below.

On the first click nothing happens but on the second click the browser window is opening up.


How is it possible to make it open up on the first click ?

                                <asp:ImageButton ID="ImageButton3" runat="server" Height="84px" 
                                    ImageUrl="~/images/1.jpg" Width="165px" 
                                    onclick="ImageButton3_Click" />

    protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
        String openURL = "javascript:window.open('" + "Folder1/testing.aspx" + "');return false;";
        ImageButton3.OnClientClick = openURL;


on click event for my control


hi ,

I have a project that when I add for example a button control I can not achieve click event ,

I can do add click event but when I add breakpoint I can not sense any response .... is there any probelem witg vs2010 ?

Dynamically creating Gridview Template - Linkbutton Click not working



I have written some code to dynamically generate template columns for gridview which works well. However, each cell in the gridview has to be a linkbutton, which when clicked does a db update and redirects to a specific url with some parameters in it.

I have attached a click event handler to the linkbutton in the InstantiateIn method but the event does not seem to fire.

Could someone please help? the code is below -

//Dynamically creating the Grid

protected void btnAnalyze_Click(object sender, EventArgs e)

Ajax Accordion to load data from client click event


I have a Ajax Accordion control on my page with treeview in Content Template. As the treeview for each pane are big. I am wondering whether I can load the treeview from codebehind only after the pane is selected. I can reuse the code from ItemDataBound of Accordion control.

Infopath button click event in custom workflow code.


Hi All,

I have designed the infopath form(Init) and integrated with my state machine workflow. i want to access button click event (designed in Infopath form) in my workflow code.

Can you help me.




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend