Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 28th, 2006, 12:16 PM
Authorized User
 
Join Date: Mar 2006
Location: CHENNAI, TN, India.
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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....

Regards,
Sathya M

  #2 (permalink)  
Old December 28th, 2006, 12:19 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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.
  #3 (permalink)  
Old December 28th, 2006, 04:57 PM
Authorized User
 
Join Date: Feb 2006
Location: Ahmedabad, Gujarat, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Hi,

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...

Savan


Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Page and Content Page with Java script Harjinder ASP.NET 2.0 Professional 1 February 1st, 2008 10:31 AM
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
Master Page refresh only the content skyler ASP.NET 2.0 Professional 5 May 2nd, 2007 06:52 AM
Master Page/Content Pages coleenh ASP.NET 2.0 Basics 1 September 26th, 2006 02:17 PM
Master Pages: Overriding header content sankerbrand ASP.NET 2.0 Basics 2 July 24th, 2006 12:16 PM





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