Properly reference aspx field in code behind to populate another field

I am using the aspx calendar in a popup (so calendar will be small icon on screen).  the calendar comes up, when the image is clicked. I can select date, and then it errors out. I am it is due to syntax. I am using web froms with a master page and control pages.

I am attaching 2 files. the jpg shows online screen, and jscipt erorr. The 2nd has the code for all three files being used.

I am a newbie to .NET and relearning how to use JavaScript.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try changing the popup code like below:
<a href="javascript:;" onclick="'popup.aspx?textbox=<%=TextBox1.ClientID%>','cal','width=250,height=225,left=270,top=180')">

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mahpogAuthor Commented:
That did the trick! My gosh, such an easy fix, when you have the expertise!  Thanks!  Is there any good book on jscript/javascript for I have been searching for one to read and learn more.
I am not sure of any such book as there isn't really anything different with javascript when using with ASP.NET.
The reason for using <%=TextBox1.ClientID%> was because it's ASP.NET that changes the ID of a field if it's inside masterpage or some other control.
mahpogAuthor Commented:
Okay. That is good to know.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.