hi
below is table in database that bind gridview from this table...
Information table
id |
MalkeMobile |
sms |
1 |
123123 |
0 |
2 |
654654 |
0 |
3 |
88888888 |
1 |
4 |
9585698 |
2 |
belwo is gridview:
<asp:GridView ID="Grdmalek" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField ItemStyle-Width="200px" ItemStyle-VerticalAlign="Middle" ShowHeader="False">
<ItemTemplate>
<asp:Label ID="LblNamemalek" runat="server" Text='<%#Eval("MalkeMobile").ToString()%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="200px" ItemStyle-VerticalAlign="Middle" ShowHeader="False">
<ItemTemplate>
<asp:Label ID="LblNamemalek" runat="server" Text='<%#Eval("id").ToString()%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
I define button in page -->Btninsert
I want when I click on button it will insert '1' into sms column in information table that bind in gridview (based on id)
see here it will bind Id=1 and 2 in gridview I want when I click on button it will insert number '1' into sms column with id=1 and 2
below is SP that bind gridview:
create procedure [dbo].[ViewMalekInfo]
as
begin
select MalkeMobile,id
from information
where Sms='0'
end
best regards
neda