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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Control Issue

Status
Not open for further replies.

jino

Programmer
Apr 1, 2004
41
0
0
CA
Hi,

I am hosting an ASP.NET application as part of a website. The website is maintained by a third party. My application has to fit into these web pages - by keeping the structure(left menu, right menu and images on top) of the pages similar.

There are some banners that run across the top of all the pages. I encased the HTML for this part as a user control and added it to my pages. But my page does not respond to events when I include the user control. My page works fine if I remove the usercontrol.

The code for usercontrol is pasted below. Any ideas?

Code:
<table width="743" border="0" cellspacing="0" cellpadding="0" align="center" ID="Table1">

<tr>
<td height="15"><img src="images/spacer.gif" alt="" width="1" height="15" border="0"></td>
</tr>

<tr>
<td><a href="../index.html"><img src="images/left.jpg" alt="NSDCS" width="333" height="99" border="0"></a><img src="images/right.jpg" alt="NSDCS"
width="409" height="99" border="0"></td>
</tr>

<tr>
<td height="7"><img src="images/spacer.gif" width="1" height="7" border="0" alt=""></td>
</tr>

<tr>
<td height="1"><img src="dots_743.gif" width="743" height="1" border="0" alt=""></td>
</tr>

<tr>
<td height="75" bgcolor="#e0eeee" valign="top">
<!--START Breadcrumb and Search Row-->
<table width="743" border="0" cellspacing="0" cellpadding="0" ID="Table2">
<tr>
<!--Breadcrumb Cell-->
<td width="15"><img src="images/spacer.gif" width="15" height="1" border="0" alt=""></td>
<td width="443" align="left" valign="top" id="breadcrumbs">
<img src="images/spacer.gif" width="1" height="3" border="0" alt=""><br>
<p class="breadcrumbs"><a class="breadcrumbs" href="[URL unfurl="true"]http://www.abc.de.com"[/URL] target="_blank">Home</a> &gt; <a class="breadcrumbs" href="../index.html">My Home</a> &gt; <a href="index.html" class="breadcrumbs">
Heading1</a> &gt; Heading2</p>
<img src="images/spacer.gif" alt="" width="1" height="2" border="0"><br>
<a href="../index.html" class="menublue">Home</a>&nbsp;&nbsp;&nbsp;<a href="../sitemap.html" class="menublue">
Site Map</a>&nbsp;&nbsp;&nbsp;
<a href="../contactus/offices.html" class="menublue">Contact Us</a>&nbsp;&nbsp;&nbsp;<a href="../print/print.asp?Page=Groups/early.html" onclick="NewWindow(this.href,'Print_Page','500','500','yes');return false;"
class="menublue">Printer Friendly</a></td>
<!--Search Cell-->
<td width="265" align="right" valign="top" id="search">
<img src="images/spacer.gif" alt="" width="1" height="5" border="0"><br>


<form action="[URL unfurl="true"]http://www.abc.de.com/folder1/search.asp"[/URL] method="get" name="question" target="_blank" ID="Form1"> 
<a href="[URL unfurl="true"]http://www.abc.de.com/folder1/ask/"[/URL] methods="get" name="question" target="_blank">
<img src="images/ask.gif" width="103" height="24" alt="Ask" border="0" align="bottom"></a> <input class="inputtext" name="q" size="12" maxlength="255" ID="Text1">
<input type="image" name="btnG" src="images/go.gif" alt="Search" ID="Image1"> 

<!--input type="hidden" name="site" value="master_collection" ID="Hidden1">
<input type="hidden" name="client" value="master_collection" ID="Hidden2"> <input type="hidden" name="restrict" value="GOVNS" ID="Hidden3">
<input type="hidden" name="proxystylesheet" value="[URL unfurl="true"]http://www.abc.de.com/folder1/xslt/ask.xslt"[/URL]
ID="Hidden4"> <input type="hidden" name="output" value="xml_no_dtd" ID="Hidden5"><br>		
<img src="spacer.gif" alt="" width="1" height="5" border="0"><br-->
						<a class="menublack">or try</a>&nbsp;&nbsp;<a class="menublue" target="_blank" href="[URL unfurl="true"]http://abc.de.com/folder2/default.asp"><strong>How[/URL] 
Do I</strong></a>&nbsp;&nbsp; 

</form>
</td>

<td width="10"><img src="images/spacer.gif" width="10" height="1" border="0" alt=""></td>
</tr>
</table>
<!--END Breadcrumb and Search Row-->
</td>
</tr>
<tr>
<td height="1"><img src="images/dots_743.gif" width="743" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="7"><img src="images/spacer.gif" width="1" height="7" border="0" alt=""></td>
</tr>
</table>

Thanks in advance

Jino
 
Any ideas?
Looks like you have pasted some HTML markup that represents a table. That table contains several cells. One of those cells contains a form and associated fields. What is this "usercontrol" you are talking about?

I don't see anything special about the code you have pasted. If you want my advice, remove all the table layout code and reduce the whole thing massively utilising CSS... but that's not going to change anything... just seperate content from layout.

Maybe you pasted the wrong thing?

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
I have had a similar problem. I work for a University and we have standard header/footer controls (user controls) that we use on each page so that all of our web pages are somewhat uniform.

I am not sure the below is exactly right - but this is how I remember it. The problem has happend when I create a web form from scratch. I don't often do that - I usually start with an existing form and modify it, so I may have the details wrong.

Anyway I have found that if I drag the header control onto my form in the web form designer, it may put it in the wrong place. It looks fine in the designer, but if you look at the HTML there is a problem. The header control needs to be after the <Body> tag but before the <Form> tag. If it is in the wrong place, the page events don't fire.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top