Contents tagged with C#
-
How to use jQuery Date Range Picker plugin in asp.net
I stepped by this page: http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/ and let me tell you,this is one of the best and coolest daterangepicker in the web in my opinion,they did a great job with extending the original jQuery UI DatePicker.Of course I made enhancements to the original plugin (fixed few bugs) and added a new option (Clear) to clear the textbox. In this article I well use that updated plugin and show you how to use it in asp.net..you will definitely like it.
-
Reset the controls within asp placeholder
I use placeholders very much in many projects,but in one of the projects I was asked to reset the controls within a specific placeholder to their original state after the user has finished from inserting his/her data.
As everyone of us know,to keep the controls within a placeholder from disappearing after postbacks you have to recreate them,we add such a code in i.e. page_load,the controls will be recreated and their values will be loaded from viewstate (for some of them like textbox,checkboxs,..etc) automatically,that placeholder contains only textboxs so what I need is to block/ loading/clear that viewstate after inserting the data.
First thought: Customizing placeholder
I thought about it and tried overriding many methods but no success at all...maybe I'm missing something not sure.
Second thought: recreate the controls 2 times:
In page_load,I recreate the controls within that placeholder then in button click (the button that saves user's data) I recreate them once more and it worked!
I just thought of sharing my experience in that case with everyone in case anyone needed it,any better suggestion(s) is welcomed. -
Grouping List Items in ASP.Net DropDownList
As many of us know,currently ASP.Net dropdownlist control doesn’t support grouping list items,though you can create it easily in pure html using "select" :