Javascript with ASP.NET Master Page

I faced difficulties while using javascript in Web Form with Master Page. I was trying to use a Javascript Calender in asp.net page and this requires the FORM name and CONTROL name to initiate the calender. So, I started with the following code snippet.

                
new tcal ({
'formname': 'Form1',
'controlname': 'dateTextBox'				
});			 


Simply, it didn't work. I viewed my Web Form in browser, had a look at Page Source Code (Right Click on Web Page) to find out FORM name and CONTROL name. This following code snippet is working now.

                
new tcal ({
'formname': 'aspnetForm',
'controlname': 'ctl00_ContentPlaceHolder1_dateTextBox'				
});			 

Thanks
A Rahim Khan

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: