Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server Gridview , +
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 30-Dec-12 23:50pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Ranjith Reddy CSE at 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">

<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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Use right words to speak ,this is show maturity level.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Use right words to speak ,this is show maturity level.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

Use right words to speak ,this is show maturity level.follow the best practice
write the code in .cs file then use that code.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

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

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

  Print Answers RSS
0 OriginalGriff 6,803
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,421
3 Manas Bhardwaj 4,841
4 Maciej Los 4,330


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100