473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Two Different User Control on Same ASPX Page

Hi All,

I have created two different User Control. This two UCs have their own
Javascript code to do some stuff.

Now both UCs are mutualy exclusive like when one is visible I have to
hide second one.

This is working fine if I am not adding that ClicntSide Script, but
when I am inserting client side scripts, it started giving me error.

As ClientSide script is gettign Add, but as user control is not
visible and hence its child control is not available and so that
Script is not able to search that control.

Can anyone has idea how do I resolve the problem?

Regards
Rushikesh

Jun 1 '07 #1
3 1489
whats your error?
"Rushi" <ru*************@gmail.comwrote in message
news:11**********************@j4g2000prf.googlegro ups.com...
Hi All,

I have created two different User Control. This two UCs have their own
Javascript code to do some stuff.

Now both UCs are mutualy exclusive like when one is visible I have to
hide second one.

This is working fine if I am not adding that ClicntSide Script, but
when I am inserting client side scripts, it started giving me error.

As ClientSide script is gettign Add, but as user control is not
visible and hence its child control is not available and so that
Script is not able to search that control.

Can anyone has idea how do I resolve the problem?

Regards
Rushikesh

Jun 1 '07 #2
wrap them in a <div style="display:none;"></div>

they will still exist insofar as asp and javascript are concerned, so
take that into consideration for any assumptions about state testing.

Jun 1 '07 #3
Actually I am using two differnt UserControl in one UpdaePanel.

Now both Usercontrol are mutualy exclusive...

As Atalas is not doing any postback so I cant use code like

myUserControl.visible = true;

Now, I put this UC in a Div...And trying to hide this DIV using some
Javascript.

startupScript = "<script language=javascriptHideOthersTab(); </
script>"
Page.ClientScript.RegisterStartupScript(Me.GetType (), "Startup",
startupScript)
My javascript function is looks like.....

function HideOthersTab()
{
//var targetEleID;
//targetEleID.options[2].selected=true;

document.getElementById('<%= DivforMeetingResult.ClientID
%>').style.display = "block";
document.getElementById('<%= DivforMeetingResult.ClientID
%>').style.overflow = "auto";
}
Now this code is working fine....but When it sends an Ajax request,
its hiding the other UserControl for little period and then it again
showing me the both UC.

I tried lot to resolve this error....

Can any one help me?

Thankyou in Advance....

Rushikesh

Jun 4 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
1
by: moondaddy | last post by:
I need to replace a user control on a page with a different user control. The challenge I'm faced with is that this call is being made from the user control being replaced. Normally I replace...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
2
by: tshad | last post by:
I have 2 aspx pages that are virtually identical, except for a few security differences. I have 2 folders, my non-secure folder and my secure folder. There is one page in each. The one in the...
7
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb --...
10
by: sqlboy2000 | last post by:
Hello all, I have something very simple going on here and I'm scratching my head as to what the problem is. There are 4 items in my project, 2 webforms, a user control, and a module: ...
6
by: dana lees | last post by:
Hello, I am developing a c# asp.net application. I have 2 forms. In the first webform ('header') i have a label. I want to reference that label from a different form ('user'), in order to...
5
by: rn5a | last post by:
Consider the following user control which resides in Address.ascx: <script runat="server"> Public Property Address() As String Get Address = txtAddress.Text End Get Set(ByVal value As String)...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.