JavaScript - Retaining the value of selected radion button when page refreshes
Asked By anil namburi
30-Aug-10 02:51 AM
i have two radio buttons in my application, 1.yes 2.no by default 'no' is selected .when clicking on yes button it will display two more fields like starting date and ending datewith default values and user can change this values also.I have another button "ASV" when clicking on this another page will open and i will select one value in that and that value will appear in before page.Then that "radio buttons" page is refreshing and again "no" is selecting even though user selected "yes" button.so,I want to retain the value of selected radio button even though page refreshes or reloads...
Anand Malli replied to anil namburi
you will have to use ViewState for this,as you are using javascript so on your postback there is no ViewState information stored on server's ViewState so take some hidden variable of some ViewState in which you would be storing the sate of your radio button and you will set this hidden or ViewState in your button click,and when page refreshes just check this viewsate or hidden field and make your radio check or uncheck depending on that
let me know
thxs
anil namburi replied to Anand Malli
thanks for ur reply.And I need how to use the viewstate of a radio button.If possible please send the code.
thank u.
default values in sql how to save default values in sql for date?? Best way is you just set that column's default value in table at the time of creation ALTER TABLE tblname Add datecolumn datetime NOT NULL DEFAULT getdate() So when add any row in that table and didn't pass date value for that column it auto save currect date of system in that column hope
Default date for Null field DataBase I created an expression to fill null fields in one of my tables with a designated default date using the IIf function. The null fields were filled but when I apply a < = [question] criteria, records containing the default dates are not always included, depends on the criteria date. Does this issue sound familiar? Thanks! - - lrgm Access Queries Discussions DateValue (1) DateNull (1) RBrandt IIF what about trying DateNull: DateValue(NZ([XDate], #24 / 04 / 2008#)) (I've set the default date to 24 / 04 / 08 in this example - oddly, I typed it in the way Access
using cascading parameters as default value for my date picker SQL Server Hi, I have a very simple report with 3 parameters: - Number (int) - date (date picker) - test (int) I would like my date and test parameters' default values to depend on the value of the Number parameter. I have setup my test parameter to have the following default value: = Parameters!Number.Value. My date parameter's default value is returned by a stored
MOSS 2007 - How to set default values for custom field types? SharePoint Hi all, I'm having a lot of difficulty figuring out how to set default values to controls of a custom field types. My custom field type inherits from SPFieldMultiColumn. My create a page from my page layout. The two controls represents the start and end date. I want to set the start date to the current date. I'm wondering if that is even possible for a Publishing site. I managed to set default values when my control is used in a custom list, but not when used in
SSRS REPORT default values I am developing SSRS reports. . .and i am giving default values to parameters in reports. . Now when i am accessing reports in my web project, as i am setting default values it takes too much time to load the report. So can any one tell me can i set default values to report parameter through .cs. . To add parameter to Report , Follow these steps- • Add one