Help with DropDownList in ASP.NETabt drop down list
Page 1 of 1
9 Replies - 2373 Views - Last Post: 13 November 2008 - 11:23 AM
#1
Help with DropDownList in ASP.NET
Posted 11 November 2008 - 11:14 AM
am new to dis site.here is my thread.am doing a small project in asp.net using C#.i had some prob using drop down list tool.that is,i wanted to display not the present date but i wanted d-m-y to display just like how v use calender.whatever the d-m-y i wanted,it will get selected by the user from drop down list. It may be today's date-m-y r previous d-m-y r etc.etc. I think i explained well.plz clear it asap.it's very imp n urgent.
thanks in advance,
Replies To: Help with DropDownList in ASP.NET
#2
Re: Help with DropDownList in ASP.NET
Posted 11 November 2008 - 11:15 AM
am new to dis site.here is my thread.am doing a small project in asp.net using C#.i had some prob using drop down list tool.that is,i wanted to display not the present date but i wanted d-m-y to display just like how v use calender.whatever the d-m-y i wanted,it will get selected by the user from drop down list. It may be today's date-m-y r previous d-m-y r etc.etc. I think i explained well.plz clear it asap.it's very imp n urgent.
thanks in advance,
#3
Re: Help with DropDownList in ASP.NET
Posted 11 November 2008 - 11:17 AM
#4
Re: Help with DropDownList in ASP.NET
Posted 11 November 2008 - 12:01 PM
#5
Re: Help with DropDownList in ASP.NET
Posted 12 November 2008 - 07:16 AM
jjsaw5, on 11 Nov, 2008 - 11:01 AM, said:
sorry sir.i dont have any codings. i dont have any idea on codings also.plz provide me any example or any website abt ddl r if poss plz send me the full codings.am fresher so no idea abt codings.
eclipsed4utoo, on 11 Nov, 2008 - 10:17 AM, said:
yes sir.u got it.thnx.i dont have any codings. i dont have any idea on codings also.plz provide me any example or any website abt ddl r if poss plz send me the full codings.am fresher so no idea abt codings.
#6
Re: Help with DropDownList in ASP.NET
Posted 12 November 2008 - 08:34 AM
why not use a Calender control?
This post has been edited by eclipsed4utoo: 12 November 2008 - 08:34 AM
#7
Re: Help with DropDownList in ASP.NET
Posted 12 November 2008 - 07:50 PM
eclipsed4utoo, on 12 Nov, 2008 - 07:34 AM, said:
why not use a Calender control?
in my project i need to use this type of date format so i cant use calednder ctrl. it's like how date time picker works in windows application. but d diff is i want to display only d-m-y and not time.i dont know how to create this.so if u have a n idea help me.
thnx in advance,
#8
Re: Help with DropDownList in ASP.NET
Posted 13 November 2008 - 08:03 AM
DateTime startDate = DateTime.Now.AddDays(-30);
for (int i = 1; i <= 60; i++)
{
dropDownList.Items.Add(startDate.AddDays(i).ToString("dd-MM-yyyy"));
}
this will start 30 days in the past(from the current date), and go ~30 days into the future. You can make the range as wide as you would like it.
This post has been edited by eclipsed4utoo: 13 November 2008 - 08:03 AM
#9
Re: Help with DropDownList in ASP.NET
Posted 13 November 2008 - 09:22 AM
eclipsed4utoo, on 13 Nov, 2008 - 07:03 AM, said:
DateTime startDate = DateTime.Now.AddDays(-30);
for (int i = 1; i <= 60; i++)
{
dropDownList.Items.Add(startDate.AddDays(i).ToString("dd-MM-yyyy"));
}
this will start 30 days in the past(from the current date), and go ~30 days into the future. You can make the range as wide as you would like it.
thnx for d reply.but no use.bcoz my thread is totally diff n u did not get my doubt.no probs.
#10
Re: Help with DropDownList in ASP.NET
Posted 13 November 2008 - 11:23 AM
spr_vivega, on 13 Nov, 2008 - 11:22 AM, said:
eclipsed4utoo, on 13 Nov, 2008 - 07:03 AM, said:
DateTime startDate = DateTime.Now.AddDays(-30);
for (int i = 1; i <= 60; i++)
{
dropDownList.Items.Add(startDate.AddDays(i).ToString("dd-MM-yyyy"));
}
this will start 30 days in the past(from the current date), and go ~30 days into the future. You can make the range as wide as you would like it.
thnx for d reply.but no use.bcoz my thread is totally diff n u did not get my doubt.no probs.
do what?
|
|

New Topic/Question
Reply




MultiQuote




|