Click here to Skip to main content
15,896,453 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: sending email with attachment(which lies in a table as an image file ) Pin
CrazyCoder2613-Jul-09 0:24
CrazyCoder2613-Jul-09 0:24 
GeneralRe: sending email with attachment(which lies in a table as an image file ) Pin
shankbond13-Jul-09 0:54
shankbond13-Jul-09 0:54 
QuestionHow to persist clientside values Pin
CrazyCoder2613-Jul-09 0:02
CrazyCoder2613-Jul-09 0:02 
AnswerRe: How to persist clientside values Pin
Blue_Boy13-Jul-09 0:10
Blue_Boy13-Jul-09 0:10 
GeneralRe: How to persist clientside values Pin
CrazyCoder2613-Jul-09 0:21
CrazyCoder2613-Jul-09 0:21 
GeneralRe: How to persist clientside values Pin
himanshu256113-Jul-09 1:01
himanshu256113-Jul-09 1:01 
AnswerRe: How to persist clientside values Pin
Muhammad Mazhar13-Jul-09 0:36
Muhammad Mazhar13-Jul-09 0:36 
QuestionDataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'. Pin
haleemasher12-Jul-09 22:36
haleemasher12-Jul-09 22:36 
protected void UpdateRecord(object sender, GridViewUpdateEventArgs e)
       {
           GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];

           int autoid = Int32.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());
           TextBox tDate = (TextBox)row.FindControl("txtDate");
           TextBox tCoupon = (TextBox)row.FindControl("txtcoupon");
           TextBox dStart = (TextBox)row.FindControl("txtStart");
           TextBox dEnd = (TextBox)row.FindControl("txtend");
           TextBox dBy = (TextBox)row.FindControl("txtby");
           try
           {
               cnx.Open();
               SqlCommand updateCmd = new SqlCommand("Update Coupon_Info,CouponType set Coupon_Info.RecievingDate=@date,CouponType.CouponName=@Coupon,Coupon_Info.Serial_Start=@Start,Coupon_Info.Serial_End=@End,Coupon_Info.Recieved_By=@By ", cnx);
               updateCmd.CommandType = CommandType.Text;
               updateCmd.Parameters.Add("@date", SqlDbType.Date).Value = tDate.Text.Trim();
               updateCmd.Parameters.Add("@Coupon", SqlDbType.NVarChar, 60).Value = tCoupon.Text.Trim();
               updateCmd.Parameters.Add("@Start", SqlDbType.BigInt).Value = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString());

               updateCmd.Parameters.Add("@By", SqlDbType.NVarChar, 50).Value = dBy.Text.Trim();

           }
           catch (Exception ex)
           {
               ErrorMessage.Text = ex.Message;
           }
           finally
           {
               cnx.Close();
               cnx.Dispose();
           }
       }

Asp code for gridview is here
<asp:TemplateField HeaderText="Date" SortExpression="RecievingDate">

<EditItemTemplate>



<asp:TextBox ID="txtDate" Width="100px" runat="server" Text='<%# Bind("RecievingDate") %>'></asp:TextBox>

</EditItemTemplate>

<FooterTemplate>

<asp:TextBox ID="txtDate1" runat="server"  Width="100px"></asp:TextBox>

</FooterTemplate>

<ItemTemplate>

<asp:Label ID="Label1" runat="server" Text='<%# Bind("RecievingDate") %>'></asp:Label>
 Error message DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'.


</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Coupon" SortExpression="CouponName">

<EditItemTemplate>

<asp:TextBox ID="txtcoupon"  Width="100px" runat="server" Text='<%# Bind("CouponName") %>'></asp:TextBox>

</EditItemTemplate>

<FooterTemplate>

<asp:TextBox ID="txtcoupon1" Width="100px" runat="server" ></asp:TextBox>

</FooterTemplate>

<ItemTemplate>

<asp:Label ID="Label2" runat="server" Text='<%# Bind("CouponName") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Serial Start" SortExpression="Serial_Start">

<EditItemTemplate>

<asp:TextBox ID="txtstart"  Width="100px" runat="server" Text='<%# Bind("Serial_Start") %>'></asp:TextBox>

</EditItemTemplate>

<FooterTemplate>

<asp:TextBox ID="txtstart1"  Width="100px" runat="server" ></asp:TextBox>

</FooterTemplate>

<ItemTemplate>

<asp:Label ID="Label3" runat="server" Text='<%# Bind("Serial_Start") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="End" SortExpression="Serial_End">

<EditItemTemplate>

<asp:TextBox ID="txtend" Width="100px" runat="server" Text='<%# Bind("Serial_End") %>'></asp:TextBox>

</EditItemTemplate>

<FooterTemplate>

<asp:TextBox ID="txtend1" Width="100px" runat="server" ></asp:TextBox>

</FooterTemplate>

<ItemTemplate>

<asp:Label ID="Label4" runat="server" Text='<%# Bind("Serial_End") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Recieved By" SortExpression="Recieved_By">

<EditItemTemplate>

<asp:TextBox ID="txtby" Width="100px" runat="server" Text='<%# Bind("Recieved_By") %>'></asp:TextBox>

</EditItemTemplate>

<FooterTemplate>

<asp:TextBox ID="txtby1" Width="100px" runat="server" ></asp:TextBox>

</FooterTemplate>

<ItemTemplate>

<asp:Label ID="Label5" runat="server" Text='<%# Bind("Recieved_By") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>




                <asp:CommandField HeaderText ="Edit" ShowEditButton="True" />

AnswerRe: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'. Pin
Abhijit Jana12-Jul-09 23:03
professionalAbhijit Jana12-Jul-09 23:03 
GeneralRe: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'. Pin
haleemasher12-Jul-09 23:17
haleemasher12-Jul-09 23:17 
GeneralRe: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'. Pin
Nikola Markovinovic18-Aug-09 2:32
Nikola Markovinovic18-Aug-09 2:32 
Questionthis problem about VSS2005 but I dont find the board of VSS Pin
jason_mf12-Jul-09 22:14
jason_mf12-Jul-09 22:14 
AnswerRe: this problem about VSS2005 but I dont find the board of VSS Pin
Abhijit Jana12-Jul-09 23:05
professionalAbhijit Jana12-Jul-09 23:05 
Questionsession problem Pin
naveen attri12-Jul-09 20:53
naveen attri12-Jul-09 20:53 
QuestionConnect to oracle instance running on different servers Pin
ptr_Electron12-Jul-09 20:36
ptr_Electron12-Jul-09 20:36 
Questionhow to identify words with different formats from para Pin
koolprasad200312-Jul-09 20:24
professionalkoolprasad200312-Jul-09 20:24 
QuestionCall Dll Pin
raushan_912-Jul-09 19:17
raushan_912-Jul-09 19:17 
AnswerRe: Call Dll Pin
Sabari MD12-Jul-09 19:29
Sabari MD12-Jul-09 19:29 
QuestionRe: Call Dll Pin
Abhijit Jana12-Jul-09 19:32
professionalAbhijit Jana12-Jul-09 19:32 
GeneralRe: Call Dll Pin
raushan_912-Jul-09 19:32
raushan_912-Jul-09 19:32 
GeneralRe: Call Dll Pin
Sabari MD12-Jul-09 19:42
Sabari MD12-Jul-09 19:42 
GeneralRe: Call Dll Pin
raj23136212-Jul-09 20:00
raj23136212-Jul-09 20:00 
QuestionRe: Call Dll Pin
Sabari MD12-Jul-09 20:03
Sabari MD12-Jul-09 20:03 
AnswerRe: Call Dll Pin
Sabari MD12-Jul-09 20:07
Sabari MD12-Jul-09 20:07 
GeneralRe: Call Dll Pin
raushan_912-Jul-09 20:39
raushan_912-Jul-09 20:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.