Click here to Skip to main content
15,886,919 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionif statement in the html code in aspx page Pin
laziale16-Mar-10 5:39
laziale16-Mar-10 5:39 
AnswerRe: if statement in the html code in aspx page Pin
JHizzle16-Mar-10 5:41
JHizzle16-Mar-10 5:41 
GeneralRe: if statement in the html code in aspx page Pin
laziale16-Mar-10 5:43
laziale16-Mar-10 5:43 
GeneralRe: if statement in the html code in aspx page Pin
JHizzle16-Mar-10 5:50
JHizzle16-Mar-10 5:50 
AnswerRe: if statement in the html code in aspx page Pin
Sandeep Mewara16-Mar-10 5:44
mveSandeep Mewara16-Mar-10 5:44 
GeneralRe: if statement in the html code in aspx page Pin
laziale16-Mar-10 5:50
laziale16-Mar-10 5:50 
AnswerRe: if statement in the html code in aspx page Pin
Sandeep Mewara16-Mar-10 5:51
mveSandeep Mewara16-Mar-10 5:51 
GeneralRe: if statement in the html code in aspx page Pin
laziale16-Mar-10 6:03
laziale16-Mar-10 6:03 
First, thanks for your reply. I tried that thing too, but I am getting no value for the label. Here is what I have:

in the html part:

<div style="padding-left: 10px; padding-right: 10px; text-align: left; width:45%">
                                             <asp:Label ID="lblFirstName" runat="server" Text='<%#Server.HtmlEncode(Eval("FirstName").ToString())%>'></asp:Label>
                                            </div>



in the code behind:

protected void gvPpl_DataBound(object sender, GridViewRowEventArgs e)
       {


           for (int i = 0; i < gvPpl.Rows.Count; i++)
           {
               Label lblL = (Label)gvPpl.Rows[i].Cells[2].FindControl("lblFirstName");
               Label lblL1 = (Label)gvPpl.Rows[i].Cells[1].FindControl("lblFirstName");
               Label lblL2 = (Label)gvPpl.Rows[i].Cells[0].FindControl("lblFirstName");
               Label lblL3 = (Label)gvPpl.Rows[i].Cells[3].FindControl("lblFirstName");
           }
       }



I am trying with different cells, just in case I have the wrong cell, but that is not helping, all the labels have no text.

Any advice?
Thx, Laziale
AnswerRe: if statement in the html code in aspx page Pin
carlecomm16-Mar-10 17:30
carlecomm16-Mar-10 17:30 
QuestionResponse.End() Pin
pss.srinivasan16-Mar-10 5:20
pss.srinivasan16-Mar-10 5:20 
AnswerRe: Response.End() Pin
Sandeep Mewara16-Mar-10 5:38
mveSandeep Mewara16-Mar-10 5:38 
AnswerRe: Response.End() Pin
carlecomm17-Mar-10 15:17
carlecomm17-Mar-10 15:17 
QuestionWeb User Controls(ascx) Pin
jonhbt16-Mar-10 4:47
jonhbt16-Mar-10 4:47 
AnswerRe: Web User Controls(ascx) Pin
Sandeep Mewara16-Mar-10 4:58
mveSandeep Mewara16-Mar-10 4:58 
QuestionRe: Web User Controls(ascx) Pin
jonhbt16-Mar-10 5:11
jonhbt16-Mar-10 5:11 
AnswerRe: Web User Controls(ascx) Pin
Sandeep Mewara16-Mar-10 5:40
mveSandeep Mewara16-Mar-10 5:40 
Questionprocedure or function expects parameter which was not supplied Pin
ishwarya mahadevan16-Mar-10 4:42
ishwarya mahadevan16-Mar-10 4:42 
AnswerRe: procedure or function expects parameter which was not supplied Pin
Sandeep Mewara16-Mar-10 4:55
mveSandeep Mewara16-Mar-10 4:55 
Questionhow to call gridview sort event explicitly? Pin
Tridip Bhattacharjee16-Mar-10 2:51
professionalTridip Bhattacharjee16-Mar-10 2:51 
AnswerRe: how to call gridview sort event explicitly? Pin
Neh.C16-Mar-10 3:15
Neh.C16-Mar-10 3:15 
AnswerRe: how to call gridview sort event explicitly? Pin
Sandeep Mewara16-Mar-10 3:23
mveSandeep Mewara16-Mar-10 3:23 
Questionwhat is the difference between session and profile? Pin
Tridip Bhattacharjee16-Mar-10 2:51
professionalTridip Bhattacharjee16-Mar-10 2:51 
AnswerRe: what is the difference between session and profile? Pin
Sandeep Mewara16-Mar-10 3:15
mveSandeep Mewara16-Mar-10 3:15 
QuestionRe: ASP.NET Page refresh and result Pin
sowjanya315-Mar-10 22:15
sowjanya315-Mar-10 22:15 
AnswerRe: ASP.NET Page refresh and result Pin
saini arun15-Mar-10 23:00
saini arun15-Mar-10 23:00 

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.