Click here to Skip to main content
14,392,909 members
   

ASP.NET

 
GeneralRe: Newbie here. Why is my array list not working? Pin
Marc Hede28-Nov-19 10:09
MemberMarc Hede28-Nov-19 10:09 
GeneralRe: Newbie here. Why is my array list not working? Pin
Richard Deeming29-Nov-19 1:34
communityengineerRichard Deeming29-Nov-19 1:34 
GeneralRe: Newbie here. Why is my array list not working? Pin
Marc Hede29-Nov-19 4:00
MemberMarc Hede29-Nov-19 4:00 
QuestionDuring redirection localhost is not attached and page failed to load Pin
Member 1115418828-Nov-19 0:59
MemberMember 1115418828-Nov-19 0:59 
AnswerRe: During redirection localhost is not attached and page failed to load Pin
Richard Deeming28-Nov-19 2:18
communityengineerRichard Deeming28-Nov-19 2:18 
QuestionASP.net In Visual Studio 2019 Pin
Ebrahimaw20-Nov-19 14:09
MemberEbrahimaw20-Nov-19 14:09 
AnswerRe: ASP.net In Visual Studio 2019 Pin
Eddy Vluggen20-Nov-19 15:03
mveEddy Vluggen20-Nov-19 15:03 
QuestionSQL Parameter Collection - Not able to assign to SQLCommand Pin
Member 1115418819-Nov-19 7:11
MemberMember 1115418819-Nov-19 7: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 7:19
mveRichard MacCutchan19-Nov-19 7:19 
General[Solved] Re: SQL Parameter Collection - Not able to assign to SQLCommand Pin
Member 1115418819-Nov-19 20:10
MemberMember 1115418819-Nov-19 20:10 
QuestionWhat's so bad about webforms? Pin
DerekT-P18-Nov-19 5:29
professionalDerekT-P18-Nov-19 5:29 
AnswerRe: What's so bad about webforms? Pin
jkirkerx18-Nov-19 14:47
professionaljkirkerx18-Nov-19 14:47 
PraiseRe: What's so bad about webforms? Pin
Eddy Vluggen18-Nov-19 15:19
mveEddy Vluggen18-Nov-19 15:19 
GeneralRe: What's so bad about webforms? Pin
jkirkerx18-Nov-19 17:07
professionaljkirkerx18-Nov-19 17:07 
GeneralRe: What's so bad about webforms? Pin
Eddy Vluggen19-Nov-19 3:47
mveEddy Vluggen19-Nov-19 3:47 
GeneralRe: What's so bad about webforms? Pin
F-ES Sitecore19-Nov-19 0:18
mveF-ES Sitecore19-Nov-19 0:18 
GeneralRe: What's so bad about webforms? Pin
Richard Deeming19-Nov-19 2:21
communityengineerRichard Deeming19-Nov-19 2:21 
GeneralRe: What's so bad about webforms? Pin
F-ES Sitecore19-Nov-19 2:35
mveF-ES Sitecore19-Nov-19 2:35 
GeneralRe: What's so bad about webforms? Pin
jkirkerx19-Nov-19 13:59
professionaljkirkerx19-Nov-19 13:59 
GeneralRe: What's so bad about webforms? Pin
F-ES Sitecore20-Nov-19 0:04
mveF-ES Sitecore20-Nov-19 0:04 
GeneralRe: What's so bad about webforms? Pin
jkirkerx20-Nov-19 11:43
professionaljkirkerx20-Nov-19 11:43 
GeneralRe: What's so bad about webforms? Pin
DerekT-P20-Nov-19 2:22
professionalDerekT-P20-Nov-19 2:22 
GeneralRe: What's so bad about webforms? Pin
DerekT-P19-Nov-19 1:23
professionalDerekT-P19-Nov-19 1:23 
AnswerRe: What's so bad about webforms? Pin
F-ES Sitecore19-Nov-19 0:30
mveF-ES Sitecore19-Nov-19 0:30 
AnswerRe: What's so bad about webforms? Pin
A_Griffin20-Nov-19 6:57
MemberA_Griffin20-Nov-19 6: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.