Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: Resources files in VS.NET with CSharp. Pin
Kentamanos6-Feb-04 9:07
Kentamanos6-Feb-04 9:07 
GeneralRe: Resources files in VS.NET with CSharp. Pin
NeoAsimov6-Feb-04 9:28
NeoAsimov6-Feb-04 9:28 
GeneralAdding an event to prepackaged control Pin
dgroves6-Feb-04 5:01
dgroves6-Feb-04 5:01 
GeneralRe: Adding an event to prepackaged control Pin
Heath Stewart7-Feb-04 19:43
protectorHeath Stewart7-Feb-04 19:43 
GeneralRe: Adding an event to prepackaged control Pin
dgroves9-Feb-04 4:42
dgroves9-Feb-04 4:42 
GeneralPrivate Assembly in same Solution Pin
Anonymous6-Feb-04 4:52
Anonymous6-Feb-04 4:52 
GeneralRe: Private Assembly in same Solution Pin
Heath Stewart7-Feb-04 19:47
protectorHeath Stewart7-Feb-04 19:47 
GeneralObject reference not set to an instance of an object. Pin
cdwaddell6-Feb-04 4:06
cdwaddell6-Feb-04 4:06 
I have the following two code segments on different pages. On Page A (dlEvents) I get the following error "Object reference not set to an instance of an object." On Page B (dlCourseDetails) the code works fine. I have checked the control ID's to make sure they are correct. The data on the database is identical. Both pages have DataLists. In addition, I'm now having a similar problem casting a TextBox on another page. I'm stumped! Has anyone run into this? Does anyone know why it would work fine on one page and blow up on the other?

private void dlEvents_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)<br />
{<br />
Label lblPhone = (Label)(e.Item.FindControl("lblPhone"));<br />
if (lblPhone.Text.Length > 0) <br />
lblPhone.Text = string.Format("{0:(###)###-####}", double.Parse(lblPhone.Text));<br />
}


private void dlCourseDetails_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)<br />
{<br />
Label lblPhoneNumber = (Label)(e.Item.FindControl("lblCoursePhone"));<br />
if (lblPhoneNumber.Text.Length > 0) <br />
lblPhoneNumber.Text = string.Format("{0:(###)###-####}", double.Parse(lblPhoneNumber.Text));<br />
}


Thakns,
CDW
GeneralRe: Object reference not set to an instance of an object. Pin
Douglas Troy6-Feb-04 4:15
Douglas Troy6-Feb-04 4:15 
GeneralRe: Object reference not set to an instance of an object. Pin
cdwaddell6-Feb-04 4:22
cdwaddell6-Feb-04 4:22 
GeneralRe: Object reference not set to an instance of an object. Pin
Douglas Troy6-Feb-04 4:35
Douglas Troy6-Feb-04 4:35 
Generalsetting install location for merge module Pin
godzooky6-Feb-04 3:58
godzooky6-Feb-04 3:58 
GeneralRe: setting install location for merge module Pin
Douglas Troy6-Feb-04 4:04
Douglas Troy6-Feb-04 4:04 
GeneralRe: setting install location for merge module Pin
godzooky6-Feb-04 4:37
godzooky6-Feb-04 4:37 
GeneralRe: setting install location for merge module Pin
Douglas Troy6-Feb-04 6:09
Douglas Troy6-Feb-04 6:09 
GeneralRecommended Book Pin
pn19956-Feb-04 3:41
pn19956-Feb-04 3:41 
GeneralRe: Recommended Book Pin
Douglas Troy6-Feb-04 4:11
Douglas Troy6-Feb-04 4:11 
GeneralRe: Recommended Book Pin
Charlie Williams6-Feb-04 5:45
Charlie Williams6-Feb-04 5:45 
GeneralControlling generation of interface stubs Pin
Robert Matheson6-Feb-04 1:32
Robert Matheson6-Feb-04 1:32 
Generaldestructor and dispose Pin
GetOn&GetGoing6-Feb-04 1:08
GetOn&GetGoing6-Feb-04 1:08 
GeneralRe: destructor and dispose Pin
Colin Angus Mackay6-Feb-04 2:17
Colin Angus Mackay6-Feb-04 2:17 
GeneralC# Program Pin
SatyaDY5-Feb-04 23:00
SatyaDY5-Feb-04 23:00 
GeneralRe: C# Program Pin
Heath Stewart6-Feb-04 2:49
protectorHeath Stewart6-Feb-04 2:49 
QuestionCreate .dll's in VS.NET? Pin
Morten Kristensen5-Feb-04 22:29
Morten Kristensen5-Feb-04 22:29 
AnswerRe: Create .dll's in VS.NET? Pin
Mazdak5-Feb-04 22:54
Mazdak5-Feb-04 22:54 

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.