Search

You searched for the word(s): userid:876401

Matching Posts

  • how to use databound dropdownlists for calculation?

    hi there i am working on C# 2005 and i have couple of dropdownlists which are databound and are bound to date columns. now i want to compare them this is the piece of code: if (Convert.ToDateTime(ddlstartdate.SelectedItem.ToString()) <= Convert.ToDateTime(ddldate.SelectedItem.ToString()) > Convert.ToDateTime(ddlenddate.SelectedItem.ToString())) {} but this gives an error i.e.Error 188 Operator '>' cannot be applied to operands of type 'bool' and 'System.DateTime'
    Posted to C# (Forum) by sunil.bablani on 8/19/2009
  • how to validate a TextBox under EditItemtemplate of Gridview?

    hi guys, i am working in C# 2005 actually i am not able to figure out that how to validate a textbox which is in EditItemTemplate of GridView. I want the textbox to contain "active" or "closed" only i tried this but doesn't works <asp:TemplateField HeaderText="Status" SortExpression="ac_status"> <EditItemTemplate> <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("ac_status") %>' ><
    Posted to Web Forms (Forum) by sunil.bablani on 8/17/2009
  • Re: how to access data from the column?

    hi there, thanks for your help finally it is solved, have a look at this table i have made changes in the table structure 1 p00000 2 January 31 2009 3 February 28 2009 4 March 31 2009 5 April 30 2009 6 May 31 2009 7 June 30 2009 8 July 31 2009 9 August 31 2009 10 September 30 2009 11 October 31 2009 12 November 30 2009 13 December 31 2009 14 p00001 15 January 31 2008 16 February 29 2008 17 March 31 2008 18 April 30 2008 19 May 31 2008 20 June 30 2008 21 July 31 2008 22 August 31 2008 23 September
  • Re: how do i get months out of start and end date?

    hi there this is the way i will insert all the dates in the table SqlCommand pigmycmd3 = new SqlCommand("insert months_table (month_days) values (@month_days)", cnn1); pigmycmd3.Parameters.Add(new SqlParameter("@month_days", SqlDbType.VarChar, 100)); TimeSpan diff1; diff1 = Convert.ToDateTime(txtaenddt.Text) - Convert.ToDateTime(txtastdt.Text); int days1 = diff1.Days; DateTime Start = Convert.ToDateTime(txtastdt.Text); DateTime End = Convert.ToDateTime(txtaenddt.Text); DateTime
    Posted to Web Forms (Forum) by sunil.bablani on 8/9/2009
    Filed under: .net 2.0 c#
  • Re: issue regarding saving and using dates

    hi there this problem is solved i guess and it goes like this: first of all the below code will insert the dates in the sql table SqlCommand pigmycmd3 = new SqlCommand("insert months_table (month_days) values (@month_days)", cnn1); pigmycmd3.Parameters.Add(new SqlParameter("@month_days", SqlDbType.VarChar, 100)); TimeSpan diff1; diff1 = Convert.ToDateTime(txtaenddt.Text) - Convert.ToDateTime(txtastdt.Text); int days1 = diff1.Days; DateTime Start = Convert.ToDateTime(txtastdt.Text
    Posted to Web Forms (Forum) by sunil.bablani on 8/9/2009
  • Re: how to access data from the column?

    hi there yes you are right it works with p00002 but it omits the last month. however i tried the following s elect * from temptest where tr_id > @startid and tr_id <= ISNULL(@endid,@endtrid) but now when i select p00001 it shows months including p00002 also.
  • how to access data from the column?

    hi guys i am working on sql server 2005 just see this table tr_id month_days 1 p00001 2 January 31 2009 3 February 28 2009 4 March 31 2009 5 April 30 2009 6 p00002 7 January 31 2008 8 February 29 2008 9 March 31 2008 10 April 30 2008 11 May 31 2008 now here p00001 and p00002 are account no. which are inserted through stored procedure and below are the months now i need that when p00001 is selected in the dropdown all the months below p00001 and above p00002 should be shown. i mean to say what will
  • Re: how to access data from the column?

    hi there thanks for replying actually i am not good in all these see your code is working perfectly but when i select 'p00002' instead of 'p00001' i get nothing but u know it should give the following output January 31 2008 February 29 2008 March 31 2008 April 30 2008 May 31 2008 actually i need this to be finished please help me out
  • Re: how do i get months out of start and end date?

    hi there see i have created this on the Click event of Evaluate button TimeSpan diff1; diff1 = Convert.ToDateTime(txtaenddt.Text) - Convert.ToDateTime(txtastdt.Text); int days1 = diff1.Days; DateTime Start = Convert.ToDateTime(txtastdt.Text); DateTime End = Convert.ToDateTime(txtaenddt.Text); End = Start.AddDays(days1); DateTime Temp; Temp = Start; while (Temp <= End) { DropDownList1.Items.Add(Temp.ToString("MMMM") + " " + DateTime.DaysInMonth(Temp.Year, Temp.Month)); Temp
    Posted to Web Forms (Forum) by sunil.bablani on 7/26/2009
  • issue regarding saving and using dates

    hi there see i have created this on the Click event of Evaluate button TimeSpan diff1; diff1 = Convert.ToDateTime(txtaenddt.Text) - Convert.ToDateTime(txtastdt.Text); int days1 = diff1.Days; DateTime Start = Convert.ToDateTime(txtastdt.Text); DateTime End = Convert.ToDateTime(txtaenddt.Text); End = Start.AddDays(days1); DateTime Temp; Temp = Start; while (Temp <= End) { DropDownList1.Items.Add(Temp.ToString("MMMM") + " " + DateTime.DaysInMonth(Temp.Year, Temp.Month)); Temp
    Posted to Web Forms (Forum) by sunil.bablani on 7/24/2009
Page 1 of 3 (21 items) 1 2 3 Next >