Date/Time format & multiple selection with listbox problem

This is a discussion on "Date/Time format & multiple selection with listbox problem" within the ASP.NET Forum section. This forum, and the thread "Date/Time format & multiple selection with listbox problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > ASP.NET Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 12th, 2005, 10:29
New Member
Join Date: Sep 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Date/Time format & multiple selection with listbox problem

Hello there,

Currently I am working with the project which needs time format in 24 hours format(in ASP.net & C#

langauges) and other features but i am facing problem with them. I have described the problems below

in detail to easily understand, so please let me know if you know...

1> How to convert 10:30 pm into 22:30(24 hrs time format)?

2> I had used listbox with multiple selection for display of my item. Following is a example.
1. Item One.
2. Item Two.
3. Item Three.
4. Item Four.
5. Item Five.
Now at the time of record insertion I had select Item Two, Item Four, Item Five. In database I will

store its ID with comma delimiter says 2,4,5.
Now in the edit form I want to display selectionbar on old previous item in listbox. so how shall I

?
I had used below code:
for (j=0; j < IdSplit.Length; j++)
{
LstBox.SelectedValue = IdSplit[j].ToString();
}
This will shows selectionbar on last id only. In our example it will shows selectionbar on Item

Five, 5.

3> I had created checkbox dynamically with below statement FOR EACH Module.
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]'

value='A'>Add
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]'

value='E'>Edit
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]'

value='D'>Delete
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]'

value='S'>
Search Say my Module_Id = 12
After form submit, I got value by form.querystring["chk121"]; form.querystring["chk122"];
form.querystring["chk123"];
form.querystring["chk124"];
but I want to use foreach loop for checking of for loop. Because there are more then 50 modules. so

how shall I do this ?

Any help, advice or pointers on this matter would be highly appreciated.

Thanks,
Paresh
Reply With Quote

Reply

Tags
datetime, format, multiple, selection, listbox, problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
JS date format joe3dge JavaScript Forum 0 May 21st, 2007 00:11
Changing date format in date picker AdRock JavaScript Forum 1 Aug 1st, 2006 17:16
How to format date/time from input box ? kahpeng Classic ASP 1 Mar 27th, 2006 05:08
ASP - MSSQL date format problem dwair Classic ASP 5 Nov 29th, 2005 23:15
Problem accessing multiple databases, not at the same time.. poisedforflight PHP Forum 2 Nov 21st, 2005 13:25


All times are GMT. The time now is 15:47.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43