A control with ID 'LinkButton1' could not be found for the trigger in UpdatePanel 'UpdatePanelFrmHistory'

Hello mate,

i would like to use the update panel for my datagrid  to fire an event handlar method when a link button in the Template column of datagrid is clicked

 

Here is my code

<ajax:UpdatePanel runat="server" ID="UpdatePanelFrmHistory" UpdateMode="Conditional" ><ContentTemplate >

<asp:DataGrid ID="DataGrid2" runat="server" ShowHeader="False" OnPageIndexChanged ="Grd_frm_history_OnPageIndexChanged" OnItemDataBound ="DataGrid2_ItemDataBound" style="vertical-align: top; text-align: left;" AllowPaging="True" Width="800px" PageSize="20" AutoGenerateColumns="false" >

<PagerStyle NextPageText="&gt;" PrevPageText="&lt;" />

<Columns >

<asp:BoundColumn DataField ="Form Name" ItemStyle-Width="600px" ></asp:BoundColumn>

<asp:TemplateColumn ItemStyle-Width="100px" >

<ItemTemplate >

 

<asp:LinkButton ID="LinkButton1" runat ="server" Text='<%# Eval("[Download]") %>' OnClick ="lnk_Click" CommandName="get" >

 

</asp:LinkButton>

 

</ItemTemplate>

</asp:TemplateColumn>

<asp:BoundColumn DataField ="Icon" ItemStyle-Width="100px"></asp:BoundColumn>

</Columns>

</asp:DataGrid>

</ContentTemplate>

<Triggers >

<ajax:PostBackTrigger ControlID ="LinkButton1" />

 

</Triggers></ajax:UpdatePanel>

 

but the above code gives me an error :

 A control with ID 'LinkButton1' could not be found for the trigger in UpdatePanel 'UpdatePanelFrmHistory'

 

i don't know how to create update panel dynamically and specify triggers.

 

Could you please tell me a solution or a sample code?

 

Thanks in advance!


Much Obliged & Thanks a Lot,
Myself
0
Sidewinder2
10/16/2008 2:46:47 PM
asp.net.ajax-discussion 13973 articles. 1 followers. Follow

3 Replies
773 Views

Similar Articles

[PageSpeed] 7
Get it on Google Play
Get it on Apple App Store

Sidewinder,

In this case, you shouldn't need a trigger.  Since your LinkButton is already inside the update panel you want to have refreshed, this will automatically work the way you want (at least it should).  Take out your trigger and see what happens.

James


James Ashley, Magenic Technologies
(james.ashley.magenic@gmail.com)
0
vgiambattista
10/16/2008 3:22:38 PM

Thanks for ur reply Mate!,

But i got an error

sys.webforms.PageRequestManagerParserException: The message received from the server could not be parsed.Common causes for this error are when the response is modified by calls to Response.Write ,response filters ,http modules or server trace is enabled

Details:Error Parsing near "%Pdf-1.3" %[] []

10 ob'.

How do i create update panel dynamically  and add this to the datagrid and specify the trigger?

Could u please tell me a solution?



Much Obliged & Thanks a Lot,
Myself
0
Sidewinder2
10/17/2008 4:33:12 AM

Hi, You must have written Response.write() on click of link button.
This will not work inside ajax...

Create another aspx page.
Write the File download code in the page_load event of new page..
Write a java script function on link button and open the newly created page in that window.


Virendra (MCTS)

My SiteBlog
0
virendra1983
10/17/2008 5:05:24 AM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

A control with ID 'ImageButton5' could not be found for the trigger in UpdatePanel 'up1'.
I have 20 ImageButtons on my page and UpdatePanel . In Update Panel Triggers i've added all this buttons  <asp:AsyncPostBackTrigger ControlID="IB1" /> <asp:AsyncPostBackTrigger ControlID="ImageButton1" /><asp:AsyncPostBackTrigger ControlID="ImageButton2" /> <asp:AsyncPostBackTrigger ControlID="ImageButton3" /> <asp:AsyncPostBackTrigger ControlID="ImageButton4" /> <asp:AsyncPostBackTrigger ControlID="ImageButton5" /> Here I am Getting this Message A control with ID 'ImageButt...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

A control with ID 'LinkButton1' could not be found for the trigger in UpdatePanel
 hi,this is my code protected void GRD_frmselect_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)    {        if (((e.Item.ItemType == ListItemType.Item)                                || (e.Item.ItemType == ListItemType.AlternatingItem)))        {            if...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

Could not find an event named 'SelectedIndexChanged' on associated control 'ddlist' for the trigger in UpdatePanel 'upResults'
I get the error "Could not find an event named 'SelectedIndexChanged' on associated control 'ddlist' for the trigger in UpdatePanel 'upResults'" when loading my page. This works just fine when using <asp:dropdownlist> but when I change it to my custom control <vortex:combobox> it gives the above error. Any idea why? the selectedindexchanged event does exist. Is exists, accepted, but is it tied to the dropdownlist?Thanks,MaxLet Me Google That For You! Here is where the combobox is declared along with the updatepanel:<asp:ScriptManager ID="scriptManager" runat="server">&...

Could not find an event named 'dvProduct_ItemInserting' on associated control 'dvProduct' for the trigger in UpdatePanel 'UpdatePanel1'
 Hi i m using gridview and detailsView as parent detail for products in shopping cart.Both the controls are in the update panel ,DetailsView control include File Upload control so i write trigger in the update panel though this things i done correctly i m getting the above error.Below is my code  "UpdatePanel1" runat="server" UpdateMode="Conditional"> "grdProductList" runat="server" OnRowDeleting="grdProductList_RowDeleting" OnRowDataBound="grdProductList_RowDataBound" OnSelectedIndexC...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

The DataSourceID of 'gv2' must be the ID of a control of type IDataSource. A control with ID 'objDs1' could not be found.
i have a radiobutton list and gridview and a object data source at runtime i'm changing the object data source by clicking on the radiobutton list selected index changed and here is my source code....          <asp:RadioButtonList runat="server" ID="rblView" RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="True" OnSelectedIndexChanged="rblView_SelectedIndexChanged">                &nb...

The DataSourceID of 'DetailsView1' must be the ID of a control of type IDataSource. A control with ID 'AccessDataSource1' could not be found.
 Anyone help with this? i have tried lots of ways to query this database and create the insert command, including making my own data sets and setting it up that way with my own custom SQL statement.....this did not work, so i though i would use VWD 2008's own tools to create the insert, i have been left with the following error: The DataSourceID of 'DetailsView1' must be the ID of a control of type IDataSource.  A control with ID 'AccessDataSource1' could not be found.   Everything looks ok to me. Code below:   <%@ Page Title="" Lan...

The DataSourceID of 'GridView1' must be the ID of a control of type IDataSource. A control with ID 'AccessDataSource' could not be found.
what i'm missing that i get the error: The DataSourceID of 'GridView1' must be the ID of a control of type IDataSource.  A control with ID 'AccessDataSource' could not be found.      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="NewsId"                  EmptyDataText="There are no data records to display.">          &nb...

error:Could not find an event named 'onserverclick' on associated control 'Submit1' for the trigger in UpdatePanel 'UpdatePanel0'.
hi,   i have installed Asp.net2.0 Ajax extentions. and in my form i have the below code   <ajax:UpdatePanel ID="UpdatePanel0" runat ="server" UpdateMode ="Conditional" ><ContentTemplate >                <form id="login" name="login" method="post" action="">                 <p class="leftcontent">Username</p>  ...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

Target control with ID '' could not be found for extender '_AccordionExtender'.
Hey Folks, I'm trying to use the accordian in a page that uses a master page and I'm receiving this error.  I've place the following code inside the content place holder tag on the page.<atlasToolKit:Accordion runat='server' SelectedIndex='0' ID="Accordion1" AutoSize="None"FadeTransitions="true"TransitionDuration="250"FramesPerSecond="40"><Panes><atlasToolKit:AccordionPane><Header>Pane 1 </Header><Content> This is pane 1</Content></atlasToolKit:AccordionPa...

Web resources about - A control with ID 'LinkButton1' could not be found for the trigger in UpdatePanel 'UpdatePanelFrmHistory' - asp.net.ajax-discussion

Resources last updated: 12/30/2015 1:17:53 PM