Click here to Skip to main content
15,884,353 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionServer cannot append header after HTTP headers Pin
balu1234523-Mar-10 22:12
balu1234523-Mar-10 22:12 
QuestionBlakberry screen alignment from ASP.NET Pin
neer123-Mar-10 21:02
neer123-Mar-10 21:02 
QuestionIn an asp.net, how to get a reference of a custom webcontrol from a usercontrol? Pin
mittalpa23-Mar-10 17:40
mittalpa23-Mar-10 17:40 
AnswerRe: In an asp.net, how to get a reference of a custom webcontrol from a usercontrol? Pin
Arindam Tewary23-Mar-10 18:59
professionalArindam Tewary23-Mar-10 18:59 
QuestionProblem with linq on Gridview Pin
AndyASPVB23-Mar-10 11:36
AndyASPVB23-Mar-10 11:36 
QuestionCSS rendering differences based on web SERVER version? Pin
Geoff Ely23-Mar-10 8:19
Geoff Ely23-Mar-10 8:19 
AnswerRe: CSS rendering differences based on web SERVER version? Pin
romrom14-Apr-10 0:49
romrom14-Apr-10 0:49 
QuestionNeed eyes for GridView weirdness - FindControl returns null when requesting a control that I know exists Pin
Alaric_23-Mar-10 7:56
professionalAlaric_23-Mar-10 7:56 
protected void grdOutput_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Record record = (Record)e.Row.DataItem;
                if (record.StatusMessage.Length > 50 )
                {
                    ((Label)e.Row.FindControl("lblStatusMessage")).Text = record.StatusMessage.Substring(0, 50);
                }
            }


The markup
<form id="form1" runat="server">
    <div>
    <asp:GridView ID="grdOutput" runat="server" Width="895px" AllowPaging="False"
            AutoGenerateColumns="False" onrowcommand="grdOutput_RowCommand" 
            onrowdatabound="grdOutput_RowDataBound" BackColor="AntiqueWhite" 
            onrowcreated="grdOutput_RowCreated">    
            <Columns>
                <asp:BoundField HeaderText="NotificationID" DataField="NotificationID" Visible="true"/>
                <asp:BoundField HeaderText="Notifier" DataField="Notifier" visible="true" />
                <asp:TemplateField HeaderText="StatusMessage" Visible="true">
                    <ItemTemplate>
                        <asp:Label ID="lblStatusMessage" runat="server" Text='<%# Bind("StatusMessage") %>'></asp:Label>                        
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:ButtonField Text="RowClick" CommandName="RowClick" visible="false"/>
            </Columns>
            <FooterStyle BackColor="SlateGray" />
            <HeaderStyle BackColor="SlateGray" />
            <AlternatingRowStyle BackColor="LightSteelBlue" />
        </asp:GridView>
    </div>
    <div style="background-color: Gray; width:800px; Overflow:auto;">
        <asp:ListBox ID="lbxOutput" runat="server" Height="31px" Width="795px" />
        <asp:TextBox ID="hdnActiveRow" Visible="true" runat="server" />
    </div>
    </form>



e.Row.FindControl("lblStatusMessage") is returning null and I have absolutely no idea why. Any clue?
"I need build Skynet. Plz send code"

AnswerRe: Need eyes for GridView weirdness - FindControl returns null when requesting a control that I know exists Pin
Alaric_23-Mar-10 8:20
professionalAlaric_23-Mar-10 8:20 
GeneralRe: Need eyes for GridView weirdness - FindControl returns null when requesting a control that I know exists Pin
Arindam Tewary23-Mar-10 19:42
professionalArindam Tewary23-Mar-10 19:42 
GeneralRe: Need eyes for GridView weirdness - FindControl returns null when requesting a control that I know exists Pin
Alaric_24-Mar-10 3:39
professionalAlaric_24-Mar-10 3:39 
QuestionjQuery framework reference Pin
PSK_23-Mar-10 5:05
PSK_23-Mar-10 5:05 
AnswerRe: jQuery framework reference Pin
Not Active23-Mar-10 5:13
mentorNot Active23-Mar-10 5:13 
GeneralRe: jQuery framework reference Pin
PSK_23-Mar-10 5:17
PSK_23-Mar-10 5:17 
GeneralRe: jQuery framework reference Pin
Not Active23-Mar-10 5:24
mentorNot Active23-Mar-10 5:24 
GeneralRe: jQuery framework reference Pin
PSK_23-Mar-10 5:45
PSK_23-Mar-10 5:45 
GeneralRe: jQuery framework reference Pin
Not Active23-Mar-10 10:20
mentorNot Active23-Mar-10 10:20 
Questionwhat is publishing in ASP.NET Pin
kuduva23-Mar-10 4:04
kuduva23-Mar-10 4:04 
AnswerRe: what is publishing in ASP.NET Pin
PSK_23-Mar-10 4:09
PSK_23-Mar-10 4:09 
AnswerRe: what is publishing in ASP.NET Pin
Brij23-Mar-10 5:01
mentorBrij23-Mar-10 5:01 
Questionaspx page designer don't draw child collections Pin
melnac23-Mar-10 3:21
melnac23-Mar-10 3:21 
AnswerRe: aspx page designer don't draw child collections Pin
Not Active23-Mar-10 3:58
mentorNot Active23-Mar-10 3:58 
Questiondeploying asp.net to IIS Pin
hotthoughtguy23-Mar-10 1:35
hotthoughtguy23-Mar-10 1:35 
AnswerRe: deploying asp.net to IIS Pin
Sandeep Mewara23-Mar-10 1:53
mveSandeep Mewara23-Mar-10 1:53 
AnswerRe: deploying asp.net to IIS Pin
Gaurav Dudeja India23-Mar-10 1:54
Gaurav Dudeja India23-Mar-10 1: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.