Click here to Skip to main content
15,885,777 members
Home / Discussions / C#
   

C#

 
AnswerRe: Can you use functions like sprintf in c# Pin
flipdoubt2-Sep-03 7:04
flipdoubt2-Sep-03 7:04 
AnswerRe: Can you use functions like sprintf in c# Pin
leppie2-Sep-03 12:14
leppie2-Sep-03 12:14 
GeneralThanks, will check it out. Pin
IrishSonic2-Sep-03 22:06
IrishSonic2-Sep-03 22:06 
GeneralOffice Xp Task Panel Pin
Sanjay Rastogi2-Sep-03 3:15
Sanjay Rastogi2-Sep-03 3:15 
GeneralSingleCall and Threads Forever Pin
Member 4744652-Sep-03 2:32
Member 4744652-Sep-03 2:32 
GeneralWin32 API Wrapper Pin
vikramlinux1-Sep-03 23:34
vikramlinux1-Sep-03 23:34 
GeneralRe: Win32 API Wrapper Pin
J. Dunlap2-Sep-03 9:20
J. Dunlap2-Sep-03 9:20 
GeneralTrouble with 'set' accessor Pin
mikeirwin1-Sep-03 20:01
mikeirwin1-Sep-03 20:01 
I'm having a little difficulty with the set accessor. I'm working on a template-based site design and trying to use the set accessor to set the document's title. The problem is that it's not setting the title and I can't seem to figure out what I'm missing. Here's some sample code:

---
ControlBase.cs
---
public class ControlBase : System.Web.UI.UserControl
{
private string _strTitle;

public string Title
{
get
{
return _strTitle;
}

set
{
_strTitle = value;
}
}
}

---
Default.aspx
---
<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false"
Inherits="namespace.PageBase" %>
...
<title><asp:literal id="litTitle" runat="server"></asp:literal></title>

---
Default.aspx.cs
---
public class PageBase : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Literal litTitle;
private ControlBase _ctlContent;

private void Page_PreRender(object sender, System.EventArgs e)
{
if (_ctlContent.Title != string.Empty)
{
this.litTitle.Text = _ctlContent.Title;
}
}
}

---
Default.ascx.cs
---
public class Default : ControlBase
{
private void Page_Load(object sender, System.EventArgs e)
{
this.Title = "This should be the title of the document";
}
}


GeneralRe: Trouble with 'set' accessor Pin
Ista2-Sep-03 7:01
Ista2-Sep-03 7:01 
GeneralRe: Trouble with 'set' accessor Pin
mikeirwin2-Sep-03 9:21
mikeirwin2-Sep-03 9:21 
GeneralWriting and reading binary data Pin
padcom131-Sep-03 14:53
padcom131-Sep-03 14:53 
GeneralRe: Writing and reading binary data Pin
James T. Johnson1-Sep-03 16:57
James T. Johnson1-Sep-03 16:57 
GeneralRe: Writing and reading binary data Pin
James T. Johnson1-Sep-03 17:08
James T. Johnson1-Sep-03 17:08 
GeneralRe: Writing and reading binary data Pin
padcom132-Sep-03 5:01
padcom132-Sep-03 5:01 
GeneralRe: Writing and reading binary data Pin
Eric Gunnerson (msft)2-Sep-03 9:48
Eric Gunnerson (msft)2-Sep-03 9:48 
QuestionHow to call a form using reflection Pin
Ista1-Sep-03 14:20
Ista1-Sep-03 14:20 
AnswerRe: How to call a form using reflection Pin
James T. Johnson1-Sep-03 16:35
James T. Johnson1-Sep-03 16:35 
GeneralRe: How to call a form using reflection Pin
leppie1-Sep-03 18:50
leppie1-Sep-03 18:50 
GeneralRe: How to call a form using reflection Pin
James T. Johnson2-Sep-03 2:28
James T. Johnson2-Sep-03 2:28 
GeneralRe: How to call a form using reflection Pin
leppie2-Sep-03 7:08
leppie2-Sep-03 7:08 
QuestionIterate through class properties? Pin
vedbu1-Sep-03 13:33
vedbu1-Sep-03 13:33 
AnswerRe: Iterate through class properties? Pin
Ista1-Sep-03 14:14
Ista1-Sep-03 14:14 
AnswerRe: Iterate through class properties? Pin
Jim Stewart1-Sep-03 15:44
Jim Stewart1-Sep-03 15:44 
GeneralRe: Iterate through class properties? Pin
vedbu2-Sep-03 13:26
vedbu2-Sep-03 13:26 
QuestionAbout getting the decimal ASCII codes of the characters??? Pin
cemlouis1-Sep-03 12:13
cemlouis1-Sep-03 12:13 

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.