An ASP.Net webcontrol that renders as a link but has a button event model made available to the programmer.
Questions tagged [linkbutton]
444 questions
43
votes
3 answers
LinkButton Send Value to Code Behind OnClick
I have a ASP LinkButton Control and I was wondering how to send a value to the code behind when it is clicked? Is that possible with this event?

atrljoe
- 8,031
- 11
- 67
- 110
20
votes
3 answers
How to do AsyncPostBackTrigger for the LinkButton in the Repeater
In my page, I have an LinkButton inside repeater, but the UpdatePanel cannot find the LinkButton to AsyncPostBackTrigger.
Here is mycode.aspx

user1128331
- 707
- 4
- 10
- 20
20
votes
5 answers
How to make (link)button function as hyperlink?
How do I use an asp:Button or asp:LinkButton as asp:Hyperlink?
The existing Hyperlink just goes to another section on the same page: NavigateUrl="#Section2"
I want to do this in the aspx file without additional coding. Thanks.
The purpose is to have…

user763554
- 2,021
- 8
- 25
- 32
19
votes
1 answer
Getting selected row of aspgridview when click on link button to get hidden ID value
I am binding link button with title data in aspgridview and also binding hidden label which holds the ID value. when user click on this link button I would like to access the ID value. This I need because, if user logs in then only I popup detail…

NMM
- 213
- 1
- 2
- 6
18
votes
4 answers
LinkButton CommandName and CommandArgument
I'm having trouble understanding CommandName and CommandArgument associated with an ASP.NET LinkButton. I have read this article - http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.commandname.aspx and other questions on this…

A Bogus
- 3,852
- 11
- 39
- 58
17
votes
9 answers
C# Target="_blank" in a LinkButton
is it possible to have a target="_blank" in LinkButton...mine doesnt seem to be working
c#
target
linkbutton

user979331
- 11,039
- 73
- 223
- 418
15
votes
2 answers
Setting LinkButton's OnClick event to method in codebehind
I'm constructing a LinkButton from my codebehind, and I need to assign the onclick to a method, and pass a parameter with it too. I have this so far:
LinkButton lnkdel = new LinkButton();
lnkdel.Text = "Delete";
The method I want to pass it to…

Chris
- 7,415
- 21
- 98
- 190
11
votes
2 answers
Dynamically generated Linkbutton does not fire Onclick event VB.Net
I have followed some of the instructions to create a new LinkButton at runtime with an event trigger and add an event handler for the LinkButton generated. I have no idea why the new LinkButton does not trigger the event added to it. Anyone please…

Giri Dharan
- 161
- 4
- 28
11
votes
6 answers
How to let Html Link (anchor) do a postback to be like LinkButton?
I would like to ask how can i make an html anchor (a element) or even any object to do a postback or to execute an server side method?
I want to create a custom button (a wrapped with some divs to do some custom them) and i want to implement OnClick…

Ahmed Magdy
- 5,956
- 8
- 43
- 75
11
votes
5 answers
how to create a link in gridview in asp.net
I am trying to create a webpage that has a gridview. this gridview is supposed to have a link like below
http://localhost/Test.aspx?code=123
when the user clicks one of the rows' link in gridview, it will open a blank page and display some…

Arif YILMAZ
- 5,754
- 26
- 104
- 189
9
votes
5 answers
Why are linkbuttons not grayed out when disabled in FireFox?
Why when I set enabled=false on a button does it not render correctly in Firefox? Instead of graying out the link it is still blue.
[UPDATE]
ASP.net already removes such tags on the link so the only thing that is needed is to grey out he link. In…

Middletone
- 4,190
- 12
- 53
- 74
8
votes
5 answers
Invalid postback or callback argument. Why?
So I get the exception
Invalid postback or callback argument.
Event validation is enabled using
in configuration or <%@ Page
EnableEventValidation="true" %> in a
page. For security purposes, this
feature verifies that arguments to
…

Guillermo Gomez
- 1,725
- 4
- 16
- 21
8
votes
3 answers
Why won't my LinkButton inside a GridView raise its OnClick event?
I have a LinkButton inside a GridView (via an TemplateField). No matter what I try, the LinkButton will not invoke its event handler. I have tried both:
A traditional event handler ("OnClick")
A OnRowCommand event handler at the GridView…

Deane
- 8,269
- 12
- 58
- 108
7
votes
2 answers
7
votes
5 answers
ASP.NET: asp:LinkButton with Javascript disabled?
i want to use an asp:LinkButton, since it looks like a link, yet also has server-side Click handler.
But the web-server seems unable to detect if javascript is disabled on the client, and doesn't render into a mechanism that still works.
Is it…

Ian Boyd
- 246,734
- 253
- 869
- 1,219