Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello FRnds,

Am updating data using GRIDVIEW i have a update command btn inside gridview.
By using Sql Datasource i fill the data in gridview and also i can edit delete this data using sql datasource.

So finally, i need a Pop up message after editing and deleting the data.

such as after deleting it should display as Records successfully deleted.
and same thing for editing also.

But i used Sql Datasource here....


Please help. THANKS.
Posted

After deleting data u should write like that ;

ScriptManager.RegisterClientScriptBlock(base.Page, this.GetType(), "FooterRequired", "alert('Notification : Record deleted successfully');", true);

Same thing u can apply for edit also.

I hope this will help u.
 
Share this answer
 
Comments
Ranjith Reddy CSE 31-Dec-12 5:26am    
hello boss, where should i write this code....becoz am writing all my code in Inpage Technique itself....please help.

This is my code

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" HorizontalAlign="Center" Width="800px"
AllowPaging="True" AutoGenerateDeleteButton="True"
AutoGenerateEditButton="True" BackColor="#E0E0E0" CellPadding="5"
CellSpacing="1" DataKeyNames="Id">
<columns>
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False"
ReadOnly="True" SortExpression="Id" Visible="false"/>
<asp:BoundField DataField="UserName" HeaderText="UserName"
SortExpression="UserName" />
<asp:BoundField DataField="Password" HeaderText="Password"
SortExpression="Password" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName"
SortExpression="FirstName" />
<asp:BoundField DataField="LastName" HeaderText="LastName"
SortExpression="LastName" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />

<HeaderStyle BackColor="#FDCB0A" HorizontalAlign="Center" />

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:UserDBConnectionString %>"

SelectCommand="SELECT [Id], [UserName], [Password], [FirstName], [LastName], [Email] FROM [AdminLogin]"
DeleteCommand="DELETE FROM AdminLogin WHERE (Id = @Id)"
UpdateCommand="UPDATE AdminLogin SET UserName = @UserName, Password = @Password, FirstName = @FirstName, LastName = @Lastname, Email = @Email WHERE (Id = @Id)">


So please , where should i write ur code. (Pop up Message for editing and deleting from Gridview).

Please help.

Thanks for EVER.
Use right words to speak ,this is show maturity level.
 
Share this answer
 
Use right words to speak ,this is show maturity level.
 
Share this answer
 
Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
 
Share this answer
 
Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
 
Share this answer
 
Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
 
Share this answer
 
Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900