473,394 Members | 1,766 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,394 software developers and data experts.

Codebehind method not called

'ello

I have the following web user control. Everything compiles fine. The
ControlStyle property never gets called in the codebehind though?! I have
another control that does the same thing but functions fine (the below
control gets loaded into this control and gets it's ControlStyle property
from it. ). I can not for the life of me see why this one does not work

Thanx
Hein

---------------- content.ascx
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="Content.ascx.cs" Inherits="Architect.Template.Caption.Content"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td Width="100%">
<asp:Label CssClass="<%# ControlStyle %>" Width="100%" id="CaptionText"
runat="server"></asp:Label>
</td>
<td>
<asp:LinkButton CssClass="<%# ControlStyle %>" id="AddLink"
runat="server">Add</asp:LinkButton>
</td>
</tr>
<tr height="1">
<td colspan="2">
<hr class="<%# ControlStyle %>" noshade size="1">
</td>
</tr>
</table>
-----Content.ascx.cs
public class Content : ModuleCaption
{
<blah blah blah>
}

-----ModuleCaption.cs
public class ModuleCaption: System.Web.UI.UserControl
{
private string _Caption;
private string _ControlStyle;

public ModuleCaption()
{
//
// TODO: Add constructor logic here
//
}

public virtual string ControlStyle
{
set
{
_ControlStyle = value;
}
get
{
return _ControlStyle;
}
}
}
Nov 16 '05 #1
0 902

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

Similar topics

3
by: nazim | last post by:
Hi, As a real novice trying to get to grips with c#.NET and html. I have created a simple showdialogbox which is called from within a webpage.aspx, I pass values to it from the main page and i...
4
by: Kurt Schroeder | last post by:
I have a simple aspx page called type with a datagrid/w id=dGrdTyp My code behind page is not reconizing the control on the aspx page. Visualstudio.Net flaggs the dgrdTyp as undefined. Any Help?...
3
by: needin4mation | last post by:
Hi, I have my .aspx page and its .cs codebehind page that Visual Studio created. What if I want to create a function or class in another .cs page but want to use it in the codebehind page. How...
1
by: Randall Parker | last post by:
Using VS 2003 and Cassini web server. I'm new to ASP.Net and so this may be a dumb question. I'm getting an error where the type 'FarmLand.WebForm1' is not found. The Codebehind C# source file...
3
by: Paul | last post by:
I am using Visual Studio.net 2005 (and asp.net 2.0) Let's say that in a Web Project, I have created a (Dataset?) called SomeDataset.xsd. On it I have a TableAdapter called SomeTableTableAdapter...
11
by: Ranginald | last post by:
This question is about how to handle an .aspx page that references multiple methods and where to store these methods (e.g. one codefile or multiple codefiles). PREFACE ======== I have a simple...
6
by: antonyliu2002 | last post by:
Right now I put my VB code in the aspx pages. I would prefer to use codebehind, especially many of my VB functions may be shared across multiple aspx pages. I've tried a few pages with...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
1
by: ahmh | last post by:
The javascript function is called getsportart2 in the codebehind page_load I have the following Page.RegisterStartupScript("MyScript3","<script type='text/javascript'...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.