Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect components in a webform

Status
Not open for further replies.

julk

Programmer
Jun 23, 2004
10
US
hi im kind of new to C#.
i am doing a Ritch text editor dll, for a webform that im going to need.
the components runs fine it does all it need to do, and exposes all the properties i need it to expose. the proble that i have is when i drop two of my componentes into the webform there area few conflicts.

I am generating all the javaScript functions that do the BOLD,ITALIC
for the buttons. since i am doing that if two controls are droped the java script is generated twice. there fore creting an error in java script.
i found quick solution for that by just naming the function like this

functionName_"the id of the control"

this generated diferent function for diferent controls. which is fine and works. but also as it is generating twice the javaScript. with just two components i get 300 line of code. i think this is a big problem. i want to create a unique function for all of the controls that get droped into the webform. jus by calling a function and sending the name of the caller
kind o like this

changeFont(var fontSize, "name of the control that call the function");

so i gues the question is: is there a way to detect how many of my controls ahve been droped into the webform?

with this info i would only generate one set of function for all of the controls.
i have an example running at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top