Click here to Skip to main content
15,895,740 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionitemupdating in detailsview Pin
Gaurav Software Developer4-Jun-12 19:41
Gaurav Software Developer4-Jun-12 19:41 
AnswerRe: itemupdating in detailsview Pin
Sandeep Mewara5-Jun-12 6:02
mveSandeep Mewara5-Jun-12 6:02 
QuestionGetting data to the ASP.NET application from BAPI at Runtime and displaying that data(table) in Crysral Report Pin
venugopalreddy14-Jun-12 6:15
venugopalreddy14-Jun-12 6:15 
AnswerRe: Getting data to the ASP.NET application from BAPI at Runtime and displaying that data(table) in Crysral Report Pin
jkirkerx4-Jun-12 11:53
professionaljkirkerx4-Jun-12 11:53 
GeneralSearch for BAPI Pin
jkirkerx5-Jun-12 6:44
professionaljkirkerx5-Jun-12 6:44 
QuestionC# work with linq to sql Pin
classy_dog4-Jun-12 5:34
classy_dog4-Jun-12 5:34 
AnswerRe: C# work with linq to sql Pin
DeDawg4-Jun-12 7:19
DeDawg4-Jun-12 7:19 
QuestionDropDownList is giving following error : System.NullReferenceException Pin
M.S Varma4-Jun-12 2:29
M.S Varma4-Jun-12 2:29 
I am trying to edit values in a row of a GridView, Gender DropDownList which is filled with values "Male" and "Female" is giving following error :

SQL
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.


Source Error:

C#
   Line 65:         DropDownList cmbType = (DropDownList)GridView1.Rows[e.RowIndex].FindControl("cmbType");
Line 66: 
Line 67:         customer.Update(Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString()), txtName.Text, cmbGender.SelectedValue, txtCity.Text, cmbType.SelectedValue);
Line 68:         GridView1.EditIndex = -1;
Line 69:         FillCustomerInGrid();


Source File: d:\ASP.NET Examples\LoginExp\CustomerData.aspx.cs Line: 67

Stack Trace:

C#
[NullReferenceException: Object reference not set to an instance of an object.]
 CustomerData.GridView1_RowUpdating(Object sender, GridViewUpdateEventArgs e) in d:\ASP.NET Examples\LoginExp\CustomerData.aspx.cs:67
 System.Web.UI.WebControls.GridView.OnRowUpdating(GridViewUpdateEventArgs e) +131
 System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +908
 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +809
 System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +163
 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
 System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +119
 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +106
 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +175
 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +242
 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3825


Please help me solve this error.Thanks in advance.
AnswerRe: DropDownList is giving following error : System.NullReferenceException Pin
VJ Reddy4-Jun-12 6:15
VJ Reddy4-Jun-12 6:15 
AnswerRe: DropDownList is giving following error : System.NullReferenceException Pin
taha bahraminezhad Jooneghani4-Jun-12 11:27
taha bahraminezhad Jooneghani4-Jun-12 11:27 
QuestionEvery time I click a button in mymodal popup to add new row in Gridview it Disappears Pin
sheringkapoting4-Jun-12 2:18
sheringkapoting4-Jun-12 2:18 
AnswerRe: Every time I click a button in mymodal popup to add new row in Gridview it Disappears Pin
jkirkerx4-Jun-12 7:48
professionaljkirkerx4-Jun-12 7:48 
QuestionProcedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
ajitkmr094-Jun-12 1:10
ajitkmr094-Jun-12 1:10 
AnswerRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
Richard MacCutchan4-Jun-12 1:59
mveRichard MacCutchan4-Jun-12 1:59 
GeneralRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
ajitkmr094-Jun-12 20:53
ajitkmr094-Jun-12 20:53 
GeneralRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
Richard MacCutchan4-Jun-12 22:10
mveRichard MacCutchan4-Jun-12 22:10 
GeneralRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
Venkat Yerra4-Jun-12 21:02
Venkat Yerra4-Jun-12 21:02 
AnswerRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
jkirkerx4-Jun-12 11:48
professionaljkirkerx4-Jun-12 11:48 
GeneralRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
ajitkmr094-Jun-12 20:54
ajitkmr094-Jun-12 20:54 
GeneralRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
jkirkerx5-Jun-12 6:37
professionaljkirkerx5-Jun-12 6:37 
AnswerRe: Procedure or function expects parameter that was not supplied why it arise and if arise how to resolve it Pin
vvashishta4-Jun-12 22:10
vvashishta4-Jun-12 22:10 
QuestionValidation vs Business Rules (client side vs server side) Pin
Rahul Rajat Singh4-Jun-12 1:02
professionalRahul Rajat Singh4-Jun-12 1:02 
AnswerRe: Validation vs Business Rules (client side vs server side) Pin
jkirkerx4-Jun-12 7:59
professionaljkirkerx4-Jun-12 7:59 
Questionasp.net Pin
manoja medaramitla4-Jun-12 0:38
manoja medaramitla4-Jun-12 0:38 
AnswerRe: asp.net Pin
Rahul Rajat Singh4-Jun-12 1:02
professionalRahul Rajat Singh4-Jun-12 1:02 

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.