Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:876401
More Search Options
RSS Available
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
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
sunil.bablani
on 8/9/2009
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.
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
sunil.bablani
on 8/8/2009
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
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
sunil.bablani
on 8/7/2009
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
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
sunil.bablani
on 8/7/2009
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 >
TechNet Edge:
How Microsoft Reduces Operational Risk through Business Continuity Management
Channel 9:
Jeffrey Van Gogh and Bart De Smet: Inside System.Interactive
TechNet Edge:
TechNet Radio: Community Corner with John Weston (Episode 1)
TechNet Edge:
Windows Firestarter Events (Part 3 of 5): IE8 - Browse the Web in Style!
WindowsClient:
The year ahead, 2010.
TechNet Edge:
FOPE Policies Deep Dive Interview
Silverlight:
Silverlight HVP Design Update
WindowsClient:
Windows Client Developer Roundup for 12/28/2009
WindowsClient:
Snoop with 64 bit support
ASP.NET:
jQuery Hide/Close Link
ASP.NET:
Merry Christmas
TechNet Edge:
FPE Customer Story
Silverlight:
Being a writer, and having an editor. A Short Rant.
Channel 9:
Channel 9 Live at PDC09: Dr Brian Brooks (3M)
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 13 of 13
Silverlight:
Information for Silverlight HVP Developers…
WindowsClient:
Custom Content Loaders in Silverlight 4.0
WindowsClient:
MVVM Links\Info
TechNet Edge:
Check out how Dolly Parton uses IE8 and Web slices!!!
Silverlight:
A Silverlight HVP Update
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online