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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

When i click on a link i want an action

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net


When i click on a link, i want to do something with the variabels.

Pad = "C\\Uploads\\";

"j" is the name of the user.

Label1.Text = "<td><a runat='server' " + Test(Pad + x[j].ToString()) + "</a></td>";

When i click on this link i want to count how many people visited that link(store that count number in my database).

Anyone know some good tutorials?

View Complete Post

More Related Resource Links

How to catch click from link inside widget

Hello,I have an ASP.NET (3.5) page. On the page there is a widget.  Here is the page code:<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Stiri.aspx.cs" Inherits="Stiri" Title="Stiri in Teleorman" %><asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><script language="javascript" type="text/javascript" src="http://www.presaonline.com/ajx/webmasters/get/0/?tidings_number=5&show_image=on&show_body=on&show_county="></script></asp:Content> The widget (script) displays a list of news from another website like this:---------------------------------------------------------title1 (as link)short descriptiontitle2 short description.............................................---------------------------------------------------------1. When a user clicks on one of the links in the above list I want to "catch" the link.2. ISSUE: When the link (from the list) is clicked the URL is opened in another browser tab3. If a user clicks on a link I want to redirect him not to the link's URL but to a page of my website.I

Problem using an action to link to a report in another site

Hi ! I'm using SSRS 2008 with WSS 3.0 (integrated mode) and I want, from a report in a site A, to link to a report in a site B. I'm using the full path to the report and when I paste it in a browser, it correctly shows the report. When I click on the link of the action in the report from site A, a report (having the same name) from site A is displayed instead... Any help would be appreciated Thanks Paul

Remove action that appear in the menu which appears when we right click each individual item in libr

i need to remove or hide edit properties menu from  menu which appears when we right click each individual item in library 

Custom action on click of certain type of folders in a lsharepoint list


We have a Moss 2007 set up and we are trying to have the ability where in we have some folders in a list marked as "confidential"., and when the user clicks on these folder, we want to pop up a disclaimer dialog to the user, and force the user to accept or reject it.

Also we want the ability to throw this popup when the user is directly navigatinig to a certain file that resides in the folder.

Any suggestions would be greatly appreciated.



Gridview Link Button control click event


Respected Reader,

I have  Web page that uses LinkButton control inside Template Fields of Gridview.

I am trying to work on LinkButton Click event and trying to preserve the Value of LinkButton that user click, and based on that value, i want to refresh tha page data.

I used CommandName and CommandArgument property of Linkbutton, but i can use that property only in GridView_RowCommand method by checking e.CommandName expression. But the problem with that Gridview_RowCommand event fire after all other page_load activity. So the value never used in the page_load event to refresh the data in all other control.

I also tried to use OnClick Method, Session variable and Hidden variable. but when i run Response.Redirect method from Gridview_RowCommand, it clear all the Session and Hidden variable values. also tried (Response.Redirect(,false)) method but never got success.

Any suggestion will be appricated in advance.

Document icon and title link in document library don't navigate on click for one user using IE8


On a pretty vanilla SharePoint document library, a particular user browsing with IE8 can click on the document icon or the title link for a Word document but nothing happens.  Other document types were not tested, so I can't say if it was specific to Word documents. The user can however pull up the menu at the right of the title and select "Open in Microsoft Office Word" which will open the document in Word and is then able to modify and save the document.  The behavior has not been observed from other users using IE8.  I've reviewed the users Internet Options settings and didn't see anything out of the ordinary and tried disabling pop-up blocker and other potentially interfering features without changing the observed behavior.  The user is from a different location and his configuration may or may not represent the stock configuration at that site, so I can't dismiss it without determining whether it would affect all users at his site.  Word 2007 is installed on the user's machine.

Does this sound familiar?  Any suggestions for troubleshooting?

Problem with ajax action link



I have code like this. Always the "Get" method is getting called insted of "Post" method eventhough I have explicitly mentioned it as "Post"

<%= Ajax.ActionLink("Create", "Create", new AjaxOptions {HttpMethod = "POST" })%>

What could be the problem ?

How to add a custom action (a link) to Central Administration quick launch in sharepoint 2010 ?


Hello everyone,
How can I add a link to Central administration quick launch? There are several links in Central administration quick launch by default under "Central administration" text ("System settings", "Monitoring", "Backup and Restore", "Security", "Upgrade and Migration", "General Application Settings", "Application Management", "Configuration Wizards"). How can I add new link under "Configuration Wizards". And I tried  but it doesn't work. A link appeared on the Central administration page but it isn't displayed at the quick launch (left panel) .
I did that as follows:


<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
       Title="Test Menu Quick Link"

Link button Click



  I had placed 2 link buttons on Master page. On Content page, how can we make out which link button is clicked??? 

Why TabStrip/Multipage with RSS Feed link disappears when TabStrip is click on?


 Hello Community

    I have a RSS Feed link in my TabStrip/Multipage Control on a ASP.Net web page.
Also on that same Web page I have a Calendar Control.  The problem is that when I run the website
the page shows fine when it loads and if I click on a link under the default TabStrip it goes to that web page. 
But if I click on a different TabStrip the TabStrip/Mutipage and links disappear and only comes back if
I close the web page and reload the web page.

    Also if I click on the carat of the Calendar Control the TabStrip/Multipage and links disappears and only comes
back if I close the web page and reload the web page.

    Later on I would like to ad a picture to the links from the RSS Feed but right now I would like the
RSS Feed to stay on the page no matter what I click on the page.  Below is the TabStrip/Multipage:

<asp:Table ID="TMTable" runat="server

click function of link button with atlas in jquery



i have a link button in my page with atlas

<atlas:UpdatePanel ID="UpdatePanel4" runat="server"> <ContentTemplate><asp:LinkButton

How to open popup window when i click hyper link field in grid view?

I have data binding through web service using vss2008,here i have one hyper link column is there,so when i click hyper link the page is open like pop window(without toolbar,status bar, menu bar,and scrollbar)

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.

MSDN Abstract Classes Link

MSDN Reference For Abstract Clases

>>>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.

pass value from textbox to action, formcollection best way here?


Hi I'm building a e-commerce store and on quantity of product I'm going with a textbox. I thought I would ask how would you do this? a viewmodel to use a strongly typed textbox or just get the value of the textbox from the formscollection passed in to the action?

Thanks for any input

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( ) ;


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