Click here to Skip to main content
15,896,154 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionKeeping the position on the page Pin
dptalt8-May-06 9:03
dptalt8-May-06 9:03 
AnswerRe: Keeping the position on the page Pin
CWIZO8-May-06 10:05
CWIZO8-May-06 10:05 
GeneralRe: Keeping the position on the page Pin
dptalt9-May-06 5:04
dptalt9-May-06 5:04 
AnswerRe: Keeping the position on the page Pin
Joshua Lunsford8-May-06 10:22
Joshua Lunsford8-May-06 10:22 
AnswerRe: Keeping the position on the page Pin
Tirthadip8-May-06 21:57
Tirthadip8-May-06 21:57 
AnswerRe: Keeping the position on the page Pin
HimaBindu Vejella8-May-06 22:37
HimaBindu Vejella8-May-06 22:37 
QuestionError: "Base class includes the field xxx but its type yyy is not compatible with the type of control yyy Pin
leckey8-May-06 8:34
leckey8-May-06 8:34 
AnswerRe: Error: "Base class includes the field xxx but its type yyy is not compatible with the type of control yyy Pin
ToddHileHoffer8-May-06 8:45
ToddHileHoffer8-May-06 8:45 
***Portion of BreadCrumbs.cs code***
namespace Sabre_Solutions
{
///
/// Summary description for BreadCrumbs.
///
public class ctrlBreadCrumbs:System.Web.UI.WebControls.WebControl
{
public string Separator = ">";
public string RootName = "Home Page";
public char directoryNameSpacer = '_';
private string _PageTitle;


public string PageTitle
{
get
{

***and so on...****
Okay, second part. Created my own control called BreadCrumbs.ascx. This is its code (in entirety)
***code for BreadCrumbs.ascx
<%@ Register TagPrefix = "bc" Namespace = "Sabre_Solutions" Assembly = "BreadCrumbs"%>
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="BreadCrumbs.ascx.cs" Inherits="Sabre_Solutions.BreadCrumbs" %>


****End .asxc***
Part three, the code behind..
****BreadCrumbs.asc.cs*******
namespace Sabre_Solutions
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.ComponentModel;
using System.Text;

///
/// Summary description for BreadCrumbs.
///

public class BreadCrumbs : System.Web.UI.UserControl
{
protected ctrlBreadCrumbs bc1;
private string _strHeaderText;
public string HeaderText
{
get
{
return _strHeaderText;
}
set
{
_strHeaderText = value;
}
}

private void Page_Load(object sender, System.EventArgs e)
{
bc1.PageTitle = HeaderText;
}

***and so on...***



It seems to me that your base class should inherit usercontrol not web control. Then your usercontrol codefile should inhert the base class.
Like this
//Base class
public class ctrlBreadCrumbs:System.Web.UI.UserControl
{
}

//User Control

public class BreadCrumbs : ctrlBreadCrumbs
{
}

how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
QuestionRe: Error: "Base class includes the field xxx but its type yyy is not compatible with the type of control yyy Pin
leckey8-May-06 9:10
leckey8-May-06 9:10 
QuestionConnect to ADS in ASP and ASP.Net Pin
csri8-May-06 8:31
csri8-May-06 8:31 
AnswerRe: Connect to ADS in ASP and ASP.Net Pin
HimaBindu Vejella8-May-06 22:41
HimaBindu Vejella8-May-06 22:41 
GeneralRe: Connect to ADS in ASP and ASP.Net Pin
csri8-May-06 23:37
csri8-May-06 23:37 
QuestionSQLDataReader data binding error = frustrated! Pin
Kerberos258-May-06 8:29
Kerberos258-May-06 8:29 
AnswerRe: SQLDataReader data binding error = frustrated! Pin
ToddHileHoffer8-May-06 8:39
ToddHileHoffer8-May-06 8:39 
GeneralRe: SQLDataReader data binding error = frustrated! Pin
Kerberos258-May-06 8:47
Kerberos258-May-06 8:47 
GeneralRe: SQLDataReader data binding error = frustrated! Pin
ToddHileHoffer8-May-06 8:58
ToddHileHoffer8-May-06 8:58 
GeneralRe: SQLDataReader data binding error = frustrated! Pin
Kerberos258-May-06 9:10
Kerberos258-May-06 9:10 
QuestionDo something before Page Closing Problem.. Pin
cheeken2u8-May-06 7:00
cheeken2u8-May-06 7:00 
AnswerRe: Do something before Page Closing Problem.. Pin
ToddHileHoffer8-May-06 8:17
ToddHileHoffer8-May-06 8:17 
GeneralRe: Do something before Page Closing Problem.. Pin
CWIZO8-May-06 10:16
CWIZO8-May-06 10:16 
AnswerRe: Do something before Page Closing Problem.. Pin
TheManFran8-May-06 18:50
TheManFran8-May-06 18:50 
AnswerRe: Do something before Page Closing Problem.. Pin
HimaBindu Vejella8-May-06 23:35
HimaBindu Vejella8-May-06 23:35 
AnswerRe: Do something before Page Closing Problem.. Pin
Bhasker Pinninti9-May-06 3:10
Bhasker Pinninti9-May-06 3:10 
QuestionCheckBoxList Pin
sroberts828-May-06 6:47
sroberts828-May-06 6:47 
AnswerRe: CheckBoxList Pin
ToddHileHoffer8-May-06 8:28
ToddHileHoffer8-May-06 8:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.