Hello Everybody
I have a date text box im my asp.net page, I am using regular expression validator to enter the date in the format dd-mm-yyyy .
on blur event of the textbox (i am explicitly calling that onblur event in page load.) i am calling javascript to change the format of date to dd-MMM-yyyy
(i.e the user enter 01/01/2006....onblur it is changed to 01/Jan/2006)
This is working fine in page level.
But I want to create a "user control" for this . I created same thing using user control. But it is not working.
In load event of the user control , i used this script tag to recognize the javascript.
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "MyScript", "document.getElementById('Me.ChosenDate.ClientID') .value = str2", True)
But it is not working. It does not give error but does not work either
I also tried to create a .js file and call it in Page load....even this did not help
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "MyScript", "datecode.js", True)
Please help
Have a great day ahead
Regards
Sara