p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   java script in master or content pages (http://p2p.wrox.com/showthread.php?t=52016)

msathyaprasad90 December 28th, 2006 12:16 PM

java script in master or content pages
Dear All,

I am new to the asp.net 2.0. While developing with asp.net using master and content pages i was unable to add my custom validating java script coe in content page.

How can i achive this....

Look ahead for your reply....

Sathya M

Imar December 28th, 2006 12:19 PM

Hi Sathya,

Can you define "unable to add"? Do you get errors? If so, what are they?

Can you post some of your code?

Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

savan_thakkar December 28th, 2006 04:57 PM


Please check this code and let me know if it helps..

        FrontMaster fm = new FrontMaster();
        Content c=(Content)fm.FindControl("Content1");
        TextBox txt1 = (TextBox)c.FindControl("txt1");
        txt1.Attributes.Add("key", "YOUR SCRIPT GOES HERE...");

FrontMaster is your master page,Content1 is asp content control where the textbox resides and txt1 is textbox which needs to be validated...


All times are GMT -4. The time now is 12:04 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.