Click here to Skip to main content
15,885,757 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Newbie here. Why is my array list not working? Pin
Marc Hede28-Nov-19 9:09
Marc Hede28-Nov-19 9:09 
GeneralRe: Newbie here. Why is my array list not working? Pin
Richard Deeming29-Nov-19 0:34
mveRichard Deeming29-Nov-19 0:34 
GeneralRe: Newbie here. Why is my array list not working? Pin
Marc Hede29-Nov-19 3:00
Marc Hede29-Nov-19 3:00 
QuestionDuring redirection localhost is not attached and page failed to load Pin
Member 1115418827-Nov-19 23:59
Member 1115418827-Nov-19 23:59 
AnswerRe: During redirection localhost is not attached and page failed to load Pin
Richard Deeming28-Nov-19 1:18
mveRichard Deeming28-Nov-19 1:18 
QuestionASP.net In Visual Studio 2019 Pin
Ebrahimaw20-Nov-19 13:09
Ebrahimaw20-Nov-19 13:09 
AnswerRe: ASP.net In Visual Studio 2019 Pin
Eddy Vluggen20-Nov-19 14:03
professionalEddy Vluggen20-Nov-19 14:03 
QuestionSQL Parameter Collection - Not able to assign to SQLCommand Pin
Member 1115418819-Nov-19 6:11
Member 1115418819-Nov-19 6:11 
Hello Friends,

i have following code. I am getting Error "The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter[] objects."
in the line
cmd.Parameters.Add(HasPermissionParams).

Please help.

Thanks in Advance.

SqlCommand cmd = GetCommand(Sql_GetPermission);
SqlParameter[] HasPermissionParams = GetInsertParameters(Sql_GetPermission);
SetHasPermissionParams(HasPermissionParams, EmpID, Permission);
cmd.Parameters.Add(HasPermissionParams);


private static void SetHasPermissionParams(SqlParameter[] parms, string EmpID, string Permission)
{
parms[0].Value = EmpID;
parms[1].Value = Permission;
}

private const string Sql_GetPermission = "[sp_Permission]";


private static SqlParameter[] GetInsertParameters(string querytype)
{
SqlParameter[] parms = null;

switch (querytype)
{
case Sql_GetPermission:
parms = new SqlParameter[]
{
new SqlParameter("@EmpID", SqlDbType.VarChar),
new SqlParameter("@PermissionName", SqlDbType.VarChar)
};
break;
}
return parms;
}
AnswerRe: SQL Parameter Collection - Not able to assign to SQLCommand Pin
Richard MacCutchan19-Nov-19 6:19
mveRichard MacCutchan19-Nov-19 6:19 
General[Solved] Re: SQL Parameter Collection - Not able to assign to SQLCommand Pin
Member 1115418819-Nov-19 19:10
Member 1115418819-Nov-19 19:10 
QuestionWhat's so bad about webforms? Pin
DerekT-P18-Nov-19 4:29
professionalDerekT-P18-Nov-19 4:29 
AnswerRe: What's so bad about webforms? Pin
jkirkerx18-Nov-19 13:47
professionaljkirkerx18-Nov-19 13:47 
PraiseRe: What's so bad about webforms? Pin
Eddy Vluggen18-Nov-19 14:19
professionalEddy Vluggen18-Nov-19 14:19 
GeneralRe: What's so bad about webforms? Pin
jkirkerx18-Nov-19 16:07
professionaljkirkerx18-Nov-19 16:07 
GeneralRe: What's so bad about webforms? Pin
Eddy Vluggen19-Nov-19 2:47
professionalEddy Vluggen19-Nov-19 2:47 
GeneralRe: What's so bad about webforms? Pin
F-ES Sitecore18-Nov-19 23:18
professionalF-ES Sitecore18-Nov-19 23:18 
GeneralRe: What's so bad about webforms? Pin
Richard Deeming19-Nov-19 1:21
mveRichard Deeming19-Nov-19 1:21 
GeneralRe: What's so bad about webforms? Pin
F-ES Sitecore19-Nov-19 1:35
professionalF-ES Sitecore19-Nov-19 1:35 
GeneralRe: What's so bad about webforms? Pin
jkirkerx19-Nov-19 12:59
professionaljkirkerx19-Nov-19 12:59 
GeneralRe: What's so bad about webforms? Pin
F-ES Sitecore19-Nov-19 23:04
professionalF-ES Sitecore19-Nov-19 23:04 
GeneralRe: What's so bad about webforms? Pin
jkirkerx20-Nov-19 10:43
professionaljkirkerx20-Nov-19 10:43 
GeneralRe: What's so bad about webforms? Pin
DerekT-P20-Nov-19 1:22
professionalDerekT-P20-Nov-19 1:22 
GeneralRe: What's so bad about webforms? Pin
DerekT-P19-Nov-19 0:23
professionalDerekT-P19-Nov-19 0:23 
AnswerRe: What's so bad about webforms? Pin
F-ES Sitecore18-Nov-19 23:30
professionalF-ES Sitecore18-Nov-19 23:30 
AnswerRe: What's so bad about webforms? Pin
A_Griffin20-Nov-19 5:57
A_Griffin20-Nov-19 5:57 

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.