|
Can
y this?
this.ScriptManager1.RegisterAsyncPostBackControl(this.Button1)
??
|
|
|
|
|
Since I have some events related to GridView like on the click of that button I am going to fill the Grid i.e. the events are related to the GridView on the button click
so i have to give this syntax....
I had read this somewhere
|
|
|
|
|
OK
I can prefer to u, when u have fill gridview with data ,please write a method for that and call with in the pre_render event.
And remove that button set to scriptmanager as Async mode button .
after that see.
thanks
|
|
|
|
|
|
I can prefer to u, when u have fill data to gridview ,please write a method for that and call that method within the pre_render event.
After that
And remove that button set line of code (already u written in the previous post)to scriptmanager as Async mode button.
thanks
|
|
|
|
|
yes i had a separate method say "FillGrid()" which I call at the button_click event...
but on prerender it will fill grid before rendering where does AJAX work?
I do not want to refresh teh page when i click the button and it fills the grid
|
|
|
|
|
I have written the following code in aspx page
<asp:scriptmanager id="ScriptManager1" runat="server">
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional">
<triggers> <asp:postbacktrigger controlid="Button1">
<%--<asp:asyncpostbacktrigger controlid="Button2" eventname="Click"> --%>
<contenttemplate>
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datakeynames="ID" datasourceid="SqlDataSource1">
<columns>--------------
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ------">
<asp:button id="Button1" runat="server" text="Button" onclick="Button1_Click">
and this is teh code on button click is used to perform some operations say fill grid
Now waht is the error in my code?
I m not getting what i m doing wrong?
|
|
|
|
|
salon wrote: I am using a GricView control which performs some operations on teh click of button or on clicking of a link button.
Take both control,Gridview and Button,in update panel,set Updatemode as conditional.
Do not need to register button so remove this line ...............RegisterAsyncPostBackControl(this.Button1);
OR.
take gridview in update panel and button is out of update panel,set Updatemode as conditional.
set trigger of button click event in update panel.
please don't forget to vote on the post that helped you.
|
|
|
|
|
aspx page
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional">
<contenttemplate>
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datakeynames="ID" datasourceid="SqlDataSource1">
<columns> ----
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="">]]>"
SelectCommand="-----">
<asp:button id="Button1" runat="server" text="Button" onclick="Button1_Click">
aspx.cs page
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.Enabled = false;
}
strill its getting refershed
|
|
|
|
|
Put Button1 in update panel or set trigger of button click event
please don't forget to vote on the post that helped you.
|
|
|
|
|
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional">
<contenttemplate>
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datakeynames="ID" datasourceid="SqlDataSource1">
<columns> ------
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="">]]>"
SelectCommand="S--">
<asp:button id="Button1" runat="server" text="Button" onclick="Button1_Click">
is it like this?
|
|
|
|
|
i have putted it in Update Panel and how to set trigger?
|
|
|
|
|
I have a hyperlink in GridView....which links to some URL
Now I have putted the entire GridView in Update Panel and now it is not refreshing on the FillGrid button.But the hyperlinks inside the GridView are not working, infact they are showing the URL as needed but do not navigating.
what should be the problem?
|
|
|
|
|
hi, does anyone know how i can stream an avi video on as asp.net page??
many thanks in advance
|
|
|
|
|
By embedding the windows media player in your page, I beleive,
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I am running windows xp. That download seems to be for windows server 2003. any ideas how i can stream on a xp platform
|
|
|
|
|
what is the code for adding all the databases and their tables in a treeview using vb.net in asp.net
please help
|
|
|
|
|
This question was already asked today by someone else. Did it not occur to you to search the forums before posting?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i m using asp.net 2.0 , and i want to include the ajax libraries. so how can i do this ?
asif rafiq
|
|
|
|
|
By starting here http://www.asp.net/ajax/[^]
Are you really that lazy or inept that you couldn't search for this on your own?
only two letters away from being an asset
|
|
|
|
|
Try here[^].
Do you realise that AJAX and the ASP.NET AJAX libraries are two different things ? I am guessing you want the MS libraries rather than learning how to do it yourself, tho.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
my page reloads the data from data source with every refresh
I want the reload occures only when desired
So, where can I put the code that loads the data?
I tried the Page_Load , InitializeComponent , and OnInit ... but faild
Mohamed Gouda
Egypt
|
|
|
|
|
try this on Page_Load event
if(!Page.IsPostBack)<br />
{<br />
}
I Love SQL
|
|
|
|
|
Hi
i am working in asp.net using vb.net
and unable to change the password for a user
i have 3 fields old password, new password and confirm password
please help.
Thankyou
|
|
|
|