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

ASP.NET

 
QuestionDropDownList is giving following error : System.NullReferenceException Pin
M.S Varma4-Jun-12 2:29
M.S Varma4-Jun-12 2:29 
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 
OK I am supplying my code with stored proc here:


My stored proc:


USE [UniqueCorp]
GO

/****** Object: StoredProcedure [dbo].[uspUpdateUser_Step2] Script Date: 06/05/2012 12:12:38 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[uspUpdateUser_Step2]
@userID uniqueidentifier,
@Username nvarchar(50),
@CompanyName nvarchar(50),
@Address nvarchar(100),
@Country nvarchar(50),
@State nvarchar(50) = '',
@City nvarchar(50) = '',
@MobileNo nvarchar(50) = '',
@TelephoneNo nvarchar(50) = '',
@Password nvarchar(50)
AS

set nocount on;
IF Exists (SELECT [ID] FROM dbo.Users WHERE [ID] = @userID)
begin
update dbo.Users
set
UserName=@Username,
CompanyName=@CompanyName,
[Address]=@Address,
Country=@Country,
[State]=@State,
City=@City,
Mobileno=@MobileNo,
TelephoneNo=@TelephoneNo,
Password=@Password
WHERE [ID] = @userID

end
GO



and the code behind is this.......

public static int AddUpdateUser(Users user)
{
SqlParameter prmUserId = new SqlParameter("@userID", SqlDbType.UniqueIdentifier);
prmUserId.Value = user.ID;

SqlParameter prmUsername = new SqlParameter("@Username", SqlDbType.NVarChar, 50);
prmUsername.Value = user.UserName;

SqlParameter prmCompanyName = new SqlParameter("@CompanyName", SqlDbType.NVarChar, 50);
prmUsername.Value = user.CompanyName;

SqlParameter prmAddress = new SqlParameter("@Address", SqlDbType.NVarChar, 100);
prmUsername.Value = user.Address;

SqlParameter prmCountry = new SqlParameter("@Country", SqlDbType.NVarChar, 50);
prmUsername.Value = user.Country;

SqlParameter prmState = new SqlParameter("@State", SqlDbType.NVarChar, 50);
prmUsername.Value = user.State;

SqlParameter prmCity = new SqlParameter("@City", SqlDbType.NVarChar, 50);
prmUsername.Value = user.City;

SqlParameter prmMobileNo = new SqlParameter("@MobileNo", SqlDbType.Int, 50);
prmUsername.Value = user.MobileNo;

SqlParameter prmTelephoneNo = new SqlParameter("@TelephoneNo", SqlDbType.Int, 50);
prmUsername.Value = user.TelephoneNo;


SqlParameter prmPassword = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
prmUsername.Value = user.Password;

return DataAccessObject.Execute("uspUpdateUser_Step2",prmUserId, prmUsername, prmCompanyName, prmAddress, prmCountry, prmState, prmCity, prmMobileNo, prmTelephoneNo,prmPassword);
}




Please help me the problem is still there...
Procedure or function expects parameter @Username That was not supplied.....
But i debug and confirm dat value is gone to the parameter @Username.So now i hav no idea about this ....
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 
AnswerRe: asp.net Pin
taha bahraminezhad Jooneghani4-Jun-12 9:52
taha bahraminezhad Jooneghani4-Jun-12 9:52 
AnswerRe: asp.net Pin
vvashishta4-Jun-12 22:13
vvashishta4-Jun-12 22:13 
Generalasp.net and c# Pin
sathik174-Jun-12 0:34
sathik174-Jun-12 0:34 
AnswerRe: asp.net and c# Pin
Rahul Rajat Singh4-Jun-12 1:04
professionalRahul Rajat Singh4-Jun-12 1:04 
GeneralRe: asp.net and c# Pin
Pankaj Nikam4-Jun-12 19:27
professionalPankaj Nikam4-Jun-12 19:27 
QuestionDisplay Excel File in .aspx Page Pin
paas1-Jun-12 4:53
paas1-Jun-12 4:53 
AnswerRe: Display Excel File in .aspx Page Pin
Ravi Sant3-Jun-12 18:29
Ravi Sant3-Jun-12 18:29 

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.