Click here to Skip to main content
15,890,579 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionIFrame in ASP.NET Pin
trinm198711-Feb-09 17:59
trinm198711-Feb-09 17:59 
QuestionAvoid Session clear Pin
deepthy.p.m11-Feb-09 17:54
deepthy.p.m11-Feb-09 17:54 
AnswerRe: Avoid Session clear Pin
ritzy pal11-Feb-09 18:48
ritzy pal11-Feb-09 18:48 
GeneralRe: Avoid Session clear Pin
ssramvinay12-Feb-09 0:06
ssramvinay12-Feb-09 0:06 
AnswerRe: Avoid Session clear Pin
ABitSmart11-Feb-09 19:26
ABitSmart11-Feb-09 19:26 
Questionhow to disable back button.. Pin
anujbanka178411-Feb-09 17:28
anujbanka178411-Feb-09 17:28 
QuestionOnClientClick requires 2 Clicks how to solve this? Pin
rprateek11-Feb-09 15:41
rprateek11-Feb-09 15:41 
Questionhow to assign text to label in l_DataBinding(Object sender, EventArgs e) method Pin
jmk_cooljack11-Feb-09 10:20
jmk_cooljack11-Feb-09 10:20 
hi guys i'm developing a web application using n-tier archi i.e (4 tiers).
currently i'm facing problem in assigning the values to the labels which is present in a gridview and its a Template field, i'm enclosing the coding part where i'm facing the problem, i would appreciate any suggestion to solve this...
code runs here......

private void l_DataBinding(Object sender, EventArgs e)
{
_objActiveInpatient = new ActiveInpatient();
// get the control that raised this event
Label l = (Label)sender;
// get the containing row
GridViewRow row = (GridViewRow)l.NamingContainer;
// get the raw data value and make it pretty

string RawValue =DataBinder.Eval(row.DataItem,columnName).ToString();

//// I AM GETTING EXCEPTION IN THE ABOVE LINE SAYING DataBinding: 'MediQMBELib.BusinessEntityCollection`1[[MediQMBELib.ActiveInpatientReports.ActiveInpatient, MediQMBELib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' does not contain a property with the name 'PatientName'.
switch (dataType)
{
case "DateTime":
l.Text = String.Format("{0 : d}", DateTime.Parse(RawValue));
break;
case "Double":
l.Text = String.Format("{0 : ###,###,##0.00}",
Double.Parse(RawValue));
break;
case "Int16":
case "Int32":
l.Text = RawValue;
break;
case "String":

l.Text = DataBinder.Eval(row.DataItem,columnName).ToString();
break;
}
}
BUT THE PROBLEM IS THE FILE IT IS REFERRING FOR THE PROPERTY IS NOT CORRECT, AS ITS SEARCHING IN DIFFERENT .CS FILE, I'M UNABLE TO UNDERSTANDING WHY THE CONTROL IS PASSING TO DIFFERENT FILE RATHER THAN THE ACTUAL BUSINESS LAYER FILE...

ONE MORE THING I'D LIKE TO MAKE IT CLEAR THAT I'M GETTING COLLECTION OF OBJECTS i.e 2 ROWS IN THAT ROW.DATAITEM AND I'M TRYING TO ASSIGN IT TO A STRING RAWDATA BUT, I NEED SOLUTION HERE SO THAT I CAN ASSIGN THE TEXT TO THE LABEL....


I WOULD BE VERY HAPPY IF SOME ONE PUTS LIGHT ON THIS......
AnswerRe: how to assign text to label in l_DataBinding(Object sender, EventArgs e) method Pin
Christian Graus11-Feb-09 11:27
protectorChristian Graus11-Feb-09 11:27 
GeneralRe: how to assign text to label in l_DataBinding(Object sender, EventArgs e) method Pin
jmk_cooljack11-Feb-09 12:17
jmk_cooljack11-Feb-09 12:17 
GeneralRe: how to assign text to label in l_DataBinding(Object sender, EventArgs e) method Pin
Christian Graus11-Feb-09 14:55
protectorChristian Graus11-Feb-09 14:55 
GeneralRe: how to assign text to label in l_DataBinding(Object sender, EventArgs e) method Pin
jmk_cooljack11-Feb-09 19:03
jmk_cooljack11-Feb-09 19:03 
GeneralRe: how to assign text to label in l_DataBinding(Object sender, EventArgs e) method Pin
jmk_cooljack11-Feb-09 12:28
jmk_cooljack11-Feb-09 12:28 
QuestionSetting CultureInfo for thread Pin
Mokai11-Feb-09 10:02
Mokai11-Feb-09 10:02 
AnswerRe: Setting CultureInfo for thread Pin
ABitSmart11-Feb-09 16:59
ABitSmart11-Feb-09 16:59 
GeneralRe: Setting CultureInfo for thread Pin
Mokai12-Feb-09 7:35
Mokai12-Feb-09 7:35 
GeneralRe: Setting CultureInfo for thread Pin
ABitSmart12-Feb-09 14:45
ABitSmart12-Feb-09 14:45 
QuestionRegisterClientScriptBlock - message.htm din pop up at all..... Pin
edwin_nice11-Feb-09 7:01
edwin_nice11-Feb-09 7:01 
AnswerRe: RegisterClientScriptBlock - message.htm din pop up at all..... Pin
Christian Graus11-Feb-09 11:32
protectorChristian Graus11-Feb-09 11:32 
GeneralRe: RegisterClientScriptBlock - message.htm din pop up at all..... Pin
edwin_nice11-Feb-09 14:37
edwin_nice11-Feb-09 14:37 
GeneralRe: RegisterClientScriptBlock - message.htm din pop up at all..... Pin
Christian Graus11-Feb-09 14:56
protectorChristian Graus11-Feb-09 14:56 
GeneralRe: RegisterClientScriptBlock - message.htm din pop up at all..... [modified] Pin
edwin_nice12-Feb-09 6:00
edwin_nice12-Feb-09 6:00 
Questiontextbox control Pin
radupopescu77711-Feb-09 3:44
radupopescu77711-Feb-09 3:44 
AnswerRe: textbox control Pin
ABitSmart11-Feb-09 4:13
ABitSmart11-Feb-09 4:13 
GeneralRe: textbox control Pin
radupopescu77711-Feb-09 4:15
radupopescu77711-Feb-09 4:15 

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.