Hi,
I'm pulling my hair out trying to work this out. Pehaps I am
missunderstandi ng something - hopefully someone can shed some light on this:
1) I have a class library that contains a bunch of custom web controls. Two
of these controls are derived from the TextBox control, and overide the
onLoad method in order to add some client side attributes, eg:
namespace SomeControls{
public class Control1 : System.Web.UI.W ebControls.Text Box
{
public Control1 ()
{
}
protected override void OnLoad(EventArg s e)
{
this.Attributes["onblur"] = "some javascript";
base.OnLoad(e);
}
}
}
AND.........
namespace SomeControls{
public class Control2 : System.Web.UI.W ebControls.Text Box
{
public Control2 ()
{
}
protected override void OnLoad(EventArg s e)
{
this.Attributes["onfocus"] = "some other javascript";
base.OnLoad(e);
}
}
}
2) I have a some user controls, that contain the custom controls, which are
added Declaratively
3) I Dynamically load one of the user controls into my page depending on
certain factors.
My problem is this: When the page is rendered, some of the custom controls
are rendered incorrectly - they seem to be taking elements from each of the
controls that derive from the TextBox control. For instance, a control that
was declared as SomeControls:Co ntrol1 will be rendered with the attributes
from BOTH SomeControls:Co ntrol1 and SomeControls:Co ntrol2. (eg both the
onBlur and onFocus attributes) !!? To add to the strangeness, sometimes
this happens, and sometimes this does not - If there are 10 instances of
SomeControls:Co ntrol1 on the page, sometimes the top who will contain the
elements from SomeControls:Co ntrol1 and SomeControls:Co ntrol2, while the
rest will render correctly with just the SomeControls:Co ntrol1 code.
Its like the two classes SomeControls:Co ntrol1 and SomeControls:Co ntrol2 are
interfereing with each other somehow.
I hope this makes some sense - it's pretty hard to explain, and personally I
am loosing faith that I can figure out what is going on here. Can someone
exlplain? Please!
Thanks V much
S 1 1188
I understand what you are explaining, but i've never seen this behavior, and
I'm not sure what could possibly be the cause. Any chance of zipping up a
simplified example and sending it to my email (it's somewhat obfuscated, but
you can figure it out :).
Karl
-- http://www.openmymind.net/
"Sosh" <so*******@some thing.com> wrote in message
news:e3******** ******@TK2MSFTN GP14.phx.gbl... Hi,
I'm pulling my hair out trying to work this out. Pehaps I am missunderstandi ng something - hopefully someone can shed some light on this:
1) I have a class library that contains a bunch of custom web controls. Two of these controls are derived from the TextBox control, and overide the onLoad method in order to add some client side attributes, eg:
namespace SomeControls{
public class Control1 : System.Web.UI.W ebControls.Text Box
{ public Control1 () { }
protected override void OnLoad(EventArg s e) { this.Attributes["onblur"] = "some javascript"; base.OnLoad(e); } }
}
AND.........
namespace SomeControls{
public class Control2 : System.Web.UI.W ebControls.Text Box
{ public Control2 () { }
protected override void OnLoad(EventArg s e) { this.Attributes["onfocus"] = "some other javascript"; base.OnLoad(e); } }
}
2) I have a some user controls, that contain the custom controls, which are added Declaratively
3) I Dynamically load one of the user controls into my page depending on certain factors. My problem is this: When the page is rendered, some of the custom controls are rendered incorrectly - they seem to be taking elements from each of the controls that derive from the TextBox control. For instance, a control that was declared as SomeControls:Co ntrol1 will be rendered with the attributes from BOTH SomeControls:Co ntrol1 and SomeControls:Co ntrol2. (eg both the onBlur and onFocus attributes) !!? To add to the strangeness, sometimes this happens, and sometimes this does not - If there are 10 instances of SomeControls:Co ntrol1 on the page, sometimes the top who will contain the elements from SomeControls:Co ntrol1 and SomeControls:Co ntrol2, while the rest will render correctly with just the SomeControls:Co ntrol1 code.
Its like the two classes SomeControls:Co ntrol1 and SomeControls:Co ntrol2 are interfereing with each other somehow.
I hope this makes some sense - it's pretty hard to explain, and personally I am loosing faith that I can figure out what is going on here. Can someone exlplain? Please!
Thanks V much
S
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Google Mike |
last post by:
I have RH9 and am using the PHP and MySQL that came with it. I was
doing fine with all manner of my web pages for this app until I
started having this very strange problem.
It's a work order mgmt system. I have 3 tables for the orders:
TicketsOpen, TicketsVoided, and TicketsResolved. When one wants to
void a ticket, they click it, choose Void, and it is copied to the
TicketsVoided table, then removed from the TicketsOpen. And I can...
|
by: leonecla |
last post by:
Hi everybody,
I'm facing a very very strange problem with a very very simple C
program...
My goal should be to write to a binary file some numbers (integers),
each one represented as a sequence of 32 bit.
I made this stupid trial code:
---------------------------------------------
FILE *fout;
|
by: TB |
last post by:
I am seeing a very strange problem as follows...
I have a loop where a fair amount of processing is going on and near
the top of the loop I access a class that has only static helper
functions to perform some calculations. After some number of
iterations, randomly, I'll get an uncaught NullValueException error on
one of these calls, as if the class name is being treated as an object
reference and is null. Here is some psuedo-code to...
|
by: wASP |
last post by:
Hi,
I've got a pair of int properties in a class.
The properties in question are indexing values
- but that's not relevant to my problem
- or it's just symptomatic ... sort of.
They are declared as follows:
|
by: cody |
last post by:
I have a very funny/strange effect here.
if I let the delegate do "return
prop.GetGetMethod().Invoke(info.AudioHeader, null);"
then I get wrong results, that is, a wrong method is called and I have no
clue why.
But if I store the MethodInfo in a local variable I works as expected.
I do not understand why this is so, shouldn't both ways be semantically
equal?
| |
by: Trapulo |
last post by:
I've two copy af the same asp.net application. The application enter on sql
server, working with two separate databases (on the same sql server
instance, of course). The connection is made with integrated security, and
the server is a domain controller.
If I start only the first application (call the web site), all right.
If I start only the second application, all right.
If I start an application, and then call a page from the second,...
|
by: Buddy Ackerman |
last post by:
I have a web app that I have setup on numerous web servers. I've set one up for a new client at their hosting facility
and cannot get it to connect to their database. I get a "SQL Server does not exist or access denied." error. Well, the
strangeness is that I have a SQL Query tool installed on this server and can connect to the database fine using the
exact same connection parameters that I have specified in my web app. Even more strange...
|
by: Chris Ashley |
last post by:
I have been tearing my hair out (or indeed, what's left of it) all day
with this one. I'm not sure if it's a .NET issue, a server issue or
anything else and would appreciate any guidance.
Basically, I have a web app that sends emails. Very basic code, nothing
fancy, and I have had it working on about 5 machines! It's hardly worth
pasting, but here's the send method from my email class anyway. As you
can see, very basic:
public void...
|
by: Prisoner at War |
last post by:
Friends, your opinions and advice, please:
I have a very simple JavaScript image-swap which works on my end but
when uploaded to my host at http://buildit.sitesell.com/sunnyside.html
does not work.
To rule out all possible factors, I made up a dummy page for an
index.html to upload, along the lines of <html><head><title></title></
head><body></body></html>.; the image-swap itself is your basic <img
src="blah.png"...
|
by: jacob navia |
last post by:
Buffer overflows are a fact of life, and, more specifically, a fact of
C.
All is not lost however. In the book
"Value Range Analysis of C programs" Axel Simon tries to establish a
theoretical framework for analyzing C programs. In contrast to other
books where the actual technical difficulties are "abstracted away",
this books tries to analyze real C programs taking into account
pointers, stack frames, etc.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |