Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# sorting list by substring -


i have list of strings:

\\\\tecan1\\tecan #1 output\\15939-e.esy\r\n \\\\tecan1\\tecan #1 output\\15942-e.esy\r\n \\\\tecan1\\tecan #1 output\\15945-e.esy\r\n \\\\tecan1\\tecan #1 output\\15948-e.esy\r\n \\\\tecan1\\tecan #1 output\\15951-e.esy\r\n \\\\tecan1\\tecan #1 output\\15954-e.esy\r\n \\\\tecan1\\tecan #1 output\\15957-e.esy\r\n \\\\tecan1\\tecan #1 output\\15960-e.esy\r\n \\\\tecan1\\tecan #1 output\\15963-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15940-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15943-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15946-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15949-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15952-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15955-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15958-e.esy\r\n \\\\tecan_2\\output on tecan 2\\15961-e.esy\r\n \\\\tecan-5\\output\\15941-e.esy\r\n \\\\tecan-5\\output\\15944-e.esy\r\n \\\\tecan-5\\output\\15947-e.esy\r\n \\\\tecan-5\\output\\15950-e.esy\r\n \\\\tecan-5\\output\\15953-e.esy\r\n \\\\tecan-5\\output\\15956-e.esy\r\n \\\\tecan-5\\output\\15959-e.esy\r\n \\\\tecan-5\\output\\15962-e.esy\r\n 

each \r\n should new line. sorry bad formatting

i need sort list of file name 15939-e.esy, etc... need entire list in alphanumerical order filename. how sort way?

i'd use path.getfilename this

list = list.orderby(s=>path.getfilename(s)).tolist(); 

where list collection of lines.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -