Click here to Skip to main content
12,700,957 members (30,091 online)
   

ASP.NET

 
AnswerRe: asp.net. webPages, webForms, MVC, ... oh my god Pin
Sandeep Mewara21-Apr-13 0:26
mvpSandeep Mewara21-Apr-13 0:26 
AnswerRe: asp.net. webPages, webForms, MVC, ... oh my god Pin
Richard MacCutchan21-Apr-13 0:38
mvpRichard MacCutchan21-Apr-13 0:38 
GeneralRe: asp.net. webPages, webForms, MVC, ... oh my god Pin
Frygreen26-Apr-13 8:45
memberFrygreen26-Apr-13 8:45 
Questionhow to create YES/NO buttons in a popup? Pin
Qadri Jillani19-Apr-13 21:57
memberQadri Jillani19-Apr-13 21:57 
AnswerRe: how to create YES/NO buttons in a popup? Pin
Abhishek Sur20-Apr-13 2:37
professionalAbhishek Sur20-Apr-13 2:37 
Questionsetup file Pin
Ashwini kumbhar19-Apr-13 20:31
memberAshwini kumbhar19-Apr-13 20:31 
AnswerRe: setup file Pin
Karthik Harve19-Apr-13 20:56
professionalKarthik Harve19-Apr-13 20:56 
Questionjavascript __dopostback System.NullReferenceException Pin
jojoba201119-Apr-13 19:36
memberjojoba201119-Apr-13 19:36 
Here's the problem :
When the gvWorkReportList is invisble and gvWorkReportList.FooterRow =null in page loading i get the bellow error :
Quote:
System.NullReferenceException: Object reference not set to an instance of an object.
the error is on this part of code :
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');


Quote:
this is the piece of my code!

<script type="text/javascript">

        function KeyDownHandler() {

            // process only the Enter key
            if (event.keyCode == 13) {
                 
                    __doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');

                
            }
        }

    </script>


This doesn't seem like it should be that hard, so if someone could just give me a kick in the right direction, that'd be awesome.

I have used these solution but it dosen't work :

var grid = document.getElementById('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>');
                if (grid != null) {
                    __doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');

                }



var grid = document.getElementById("ctl00_ContentPlaceHolderContent_gvWorkReportList");
                if (grid != null) {
                    __doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');

                }



var gridFooter = gvWorkReportList.FooterRow;
                if (gridFooter != null) {
                    __doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');

                }

AnswerRe: javascript __dopostback System.NullReferenceException Pin
Karthik Harve19-Apr-13 21:21
professionalKarthik Harve19-Apr-13 21:21 
QuestionRe: javascript __dopostback System.NullReferenceException Pin
jojoba201119-Apr-13 21:47
memberjojoba201119-Apr-13 21:47 
AnswerRe: javascript __dopostback System.NullReferenceException Pin
Karthik Harve19-Apr-13 22:26
professionalKarthik Harve19-Apr-13 22:26 
QuestionRe: javascript __dopostback System.NullReferenceException Pin
jojoba201119-Apr-13 23:04
memberjojoba201119-Apr-13 23:04 
QuestionRe: javascript __dopostback System.NullReferenceException Pin
jojoba201121-Apr-13 18:41
memberjojoba201121-Apr-13 18:41 
Questionhow to append text on textarea T_T no people reply Pin
Michael†Cheong19-Apr-13 6:21
groupMichael†Cheong19-Apr-13 6:21 
AnswerRe: how to append text on textarea T_T no people reply Pin
Jasmine250119-Apr-13 10:45
memberJasmine250119-Apr-13 10:45 
AnswerRe: how to append text on textarea T_T no people reply Pin
mark merrens19-Apr-13 11:57
membermark merrens19-Apr-13 11:57 
GeneralRe: how to append text on textarea T_T no people reply Pin
Michael†Cheong19-Apr-13 19:39
groupMichael†Cheong19-Apr-13 19:39 
QuestionCode migration to VB to C# Pin
creatives.system18-Apr-13 20:15
membercreatives.system18-Apr-13 20:15 
AnswerRe: Code migration to VB to C# Pin
Karthik Harve18-Apr-13 21:07
professionalKarthik Harve18-Apr-13 21:07 
GeneralRe: Code migration to VB to C# Pin
dusty_dex18-Apr-13 22:48
memberdusty_dex18-Apr-13 22:48 
AnswerRe: Code migration to VB to C# Pin
Richard Deeming19-Apr-13 3:01
professionalRichard Deeming19-Apr-13 3:01 
QuestionHELP T_T save image into database (binary format) Pin
Michael†Cheong18-Apr-13 8:04
groupMichael†Cheong18-Apr-13 8:04 
AnswerRe: HELP T_T save image into database (binary format) Pin
Richard Deeming18-Apr-13 8:09
professionalRichard Deeming18-Apr-13 8:09 
GeneralRe: HELP T_T save image into database (binary format) Pin
Michael†Cheong18-Apr-13 10:44
groupMichael†Cheong18-Apr-13 10:44 
GeneralRe: HELP T_T save image into database (binary format) Pin
Richard Deeming18-Apr-13 11:03
professionalRichard Deeming18-Apr-13 11:03 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 23 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid