Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 13th, 2005, 05:50 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date/Time format & multiple selection with listbox

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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
date time format vb certified Pro VB 6 4 December 18th, 2009 08:16 AM
Multiple Selection of Listbox jasminecyriac ASP.NET 2.0 Basics 0 June 22nd, 2006 05:20 AM
bindings & date format miguel.ossa C# 12 August 28th, 2004 06:23 AM
Format Date to time field KennethMungwira VB.NET 3 November 17th, 2003 11:48 AM
Format Date Time ganesh15 PHP How-To 2 August 20th, 2003 05:26 AM



All times are GMT -4. The time now is 02:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.