CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 5/17/2007 9:18:21 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 101 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
rajeshmoorthy
Asp.Net User
changing the 'aspnetForm' id when using Masterpages5/17/2007 9:18:21 AM

0/0

I am using a calendar popup to update a date in my text box, I have scripts which works fine when using a normal aspx page (without Master pages).

However while using master pages I am not able to update the text box  and the  page gives an error

"Error calling the calendar. No Target Control Specified".  I understand that I would have to change the unique Id in order to resolve this. (I am not sure how) Can somebody help me PLEASE..

Rajesh 

 


Thanks in Advance
Rajesh
Girijesh
Asp.Net User
Re: changing the 'aspnetForm' id when using Masterpages5/17/2007 9:44:14 AM

0/0

ClientID is a property of server control, which gives the unique id,

Use this concept.


Girijesh
http://www.girijesh.in
rajeshmoorthy
Asp.Net User
Re: changing the 'aspnetForm' id when using Masterpages5/18/2007 4:40:51 AM

0/0

Girijesh,  I am not sure if you have understood me clearly,

<script language=JavaScript>
            <!-- // Below is the Script to replace the text box with the required Date -->
          
                var cal1 = new calendar1(document.forms['aspnetForm'].elements['txtPurchDt']);
                cal1.year_scroll = true;
                cal1.time_comp = false;
                <!-- // var cal2 = new calendar1(document.forms['IndentEntry'].elements['txtRequiredDate']);
                //cal2.year_scroll = true;
                //cal2.time_comp = false;
               
        </script> -->

In a normal form where you name the form as my fom the above javascript works fine if you replace aspnetform with your form name but it does not work in the same way while using master pages.  

Hope I am clear.  Could you help ....

 


Thanks in Advance
Rajesh
Amanda Wang - M
Asp.Net User
Re: changing the 'aspnetForm' id when using Masterpages5/21/2007 9:42:19 AM

0/0

Hi,

The masterpage's form id and the form name will change into aspnetForm at runtime automatically.

The design code:

 <form id="frm" runat="server" defaultbutton="btnSearch">

The source code at runtime :

 <form name="aspnetForm" method="post" action="Default.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">

 So you should use like below in javascript:

var theForm = document.forms['aspnetForm'];

    theForm = document.aspnetForm;


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
changing the 'aspnetForm' id when using Masterpages - ASP.NET Forums Re: changing the 'aspnetForm' id when using Masterpages. 05-17-2007, 5:44 AM. Contact ... Re: changing the 'aspnetForm' id when using Masterpages ...
aspnetform and master pages "aspnetform" when using master pages? Thanks, Brent beta 2 ... ...
MasterPages & aspnetForm that's what I expect the ID of the form to be, not "aspnetForm". ... "aspnetform " when using master pages? ... Brent ... Prev by Date: . ...
MasterPages & aspnetForm programmed instead of changing it to aspnetForm? ... following code on a master page: ...
How do you change default form name from "aspnetform" when using ... Changing form id "aspnetForm" when using master pages ... Re: Changing form id " aspnetForm" when using master pages ...
MasterPages & aspnetForm Is there anyway to force a master page to retain the name of the form as programmed instead of changing it to aspnetForm? ...
ASP.NET 2.0 Master Page - Preferred way to call reference control ... NET 2.0 Master Page - Preferred way to call reference control id using javascript ... when you use MasterPage, the id of the form is replaced to aspnetForm. ...
Feedback: Original id of form tag is always changed to "aspnetForm ... Description. Id of form tag is always changed to "aspnetForm". It doesn't matter what the original id is. It happens when you use masterpage. Comments ...
AJAX Not working in Particular Masterpages id="aspnetForm">
TheMSsForum.com >> Asp >> aspnetForm - The Microsoft Software Forum Web.UI.Page and its MasterPage loads fine. I imagine this context may have occurred for others using a base class and wonder if there is somewhere you might ...




Search This Site:










framework 1.1 / dnn 3.2 and framework 2 / dnn 4 happy co-existance

where can i download this skin?

linkbuttons and input boxes

asp.net masterpages and menus integrating with prebuilt templates??

data is not inserting into the table

dataprovider: mysql

why still 'unauthorizedaccessexception' even i have all avaible accounts selected?

need help with logon screen

microsoft videos: changes from asp.net 1.1 to 2.0

restrict application to run from particular pc

confusion in calling store procedure from aspx vs sql query analyzer

urlcontrol question

cryptographicexception: access is denied.

infamous bc30451: name 'company' is not declared error

dotnetnuke 3.2 vers 1.1 framework question on creating users

failed to install msxml 6.0 parser during installation of visual studio

direct users to their page based on login.

treeview problem (i think this one's easy)

currentdate control adds extra linebreak

create new user captcha control

read an url and redirect

httpcontext.current.request.url.getleftpart(uripartial.authority) from dll

server application unavailable

dnn 3.x minor bug

restoring a backup

master page: navigation from one <content> to another <content>

server xfer gone bad d:

server error ???

custom collections

import code-behind file into web.config

 
All Times Are GMT