Click here to Skip to main content
14,447,134 members
   

ASP.NET

 
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 
GeneralRe: What's so bad about webforms? Pin
DerekT-P20-Nov-19 10:05
professionalDerekT-P20-Nov-19 10:05 
AnswerRe: What's so bad about webforms? Pin
Steve Naidamast24-Nov-19 7:53
professionalSteve Naidamast24-Nov-19 7:53 
GeneralRe: What's so bad about webforms? Pin
DerekT-P24-Nov-19 10:18
professionalDerekT-P24-Nov-19 10:18 
GeneralRe: What's so bad about webforms? Pin
Steve Naidamast25-Nov-19 5:30
professionalSteve Naidamast25-Nov-19 5:30 
QuestionFacing Issues while reading an excel file and inserting it's rows to a my sql tabble. Working fine in local machine but giving error after deployement Pin
Member 1465772316-Nov-19 4:23
MemberMember 1465772316-Nov-19 4:23 
AnswerRe: Facing Issues while reading an excel file and inserting it's rows to a my sql tabble. Working fine in local machine but giving error after deployement Pin
phil.o16-Nov-19 5:08
mvephil.o16-Nov-19 5:08 
GeneralRe: Facing Issues while reading an excel file and inserting it's rows to a my sql tabble. Working fine in local machine but giving error after deployement Pin
Member 1465772317-Nov-19 8:29
MemberMember 1465772317-Nov-19 8:29 
GeneralRe: Facing Issues while reading an excel file and inserting it's rows to a my sql tabble. Working fine in local machine but giving error after deployement Pin
phil.o17-Nov-19 10:26
mvephil.o17-Nov-19 10:26 
QuestionChange datatable from column to row and bind it to gridview Pin
Anand Solomon14-Nov-19 6:19
MemberAnand Solomon14-Nov-19 6:19 
QuestionAccessing Master Page Methods in Content Page and Accessing this.Master page Control from Class Library Pin
Member 1115418813-Nov-19 19:34
MemberMember 1115418813-Nov-19 19:34 
AnswerRe: Accessing Master Page Methods in Content Page and Accessing this.Master page Control from Class Library Pin
F-ES Sitecore14-Nov-19 0:23
mveF-ES Sitecore14-Nov-19 0:23 
GeneralRe: Accessing Master Page Methods in Content Page and Accessing this.Master page Control from Class Library Pin
Member 1115418814-Nov-19 1:17
MemberMember 1115418814-Nov-19 1:17 
GeneralRe: Accessing Master Page Methods in Content Page and Accessing this.Master page Control from Class Library Pin
Richard Deeming14-Nov-19 2:25
communityengineerRichard Deeming14-Nov-19 2:25 
Question[Solved] Retrieve Session Array variable to Array variable in Class Library Project Pin
Member 1115418813-Nov-19 1:00
MemberMember 1115418813-Nov-19 1:00 
Hello Friends,

I have asp.net website and have few class libraries in the same solution.

I am trying to store a database retrieved datatable (it contains only one column) into Array variable and assigning the array into Session.
This code is in my aspx.cs page.

<b>Code is aspx.cs below:</b>
DataRow[] foundAuthors = dtPermission.Select("Value = '" + Permission + "'");
if (foundAuthors.Length != 0)
{
ArrayList permlist = new ArrayList();
foreach (DataRow dr in dtPermission.Rows)
{
permlist.Add(dr["Value"].ToString());
}
SessionHandler s = new SessionHandler();
s.SetSession(permlist, "sPermList");

I have the following code in the class library. But in this code the session value i am not sure how to assign as array list in test method. currently it is showing as string and not working. Please help.

<b>Class Library Code:</b>
public class SessionHandler : IRequiresSessionState
{
public SessionHandler() { }
public object GetSession(string key)
{
object session = HttpContext.Current.Session[key];
return session;
}
public void SetSession(object data, string key)
{
HttpContext.Current.Session.Add(key, data);
}

public bool Test(string sessionKey,string perValue)
{
string ss = GetSession(sessionKey).ToString();
--Here need to assign session value to array list and compare the perValue against array list (or) if we can directly compare session stored value and return true / false
return true;
}


}

Thanks in Advance,

Priya.

-- modified 14-Nov-19 6:23am.
AnswerRe: Retrieve Session Array variable to Array variable in Class Library Project Pin
Richard Deeming13-Nov-19 3:15
communityengineerRichard Deeming13-Nov-19 3:15 

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.