|
I m sorry but i have not used this control. but why don't u post ur problem threre and specify there exactly what problem u r facing. they would be able to solve ur problem.
|
|
|
|
|
Hi all,
What type of data i can keep in global.ajax file.After login,can i store userid and username (login specific details).Please guide me.
Thanks in advance,
Srinivas Mateti
|
|
|
|
|
|
It is global.asax not global.ajax.
sris 426 wrote: After login,can i store userid and username (login specific details)
No. Are you referring to the session_start event handler? If yes, it fires when the ASP.NET session starts not when your user logs in.
|
|
|
|
|
When user logs in which event will be fired?
|
|
|
|
|
No ! Global.asax done his opertaion before that. What do you want ? Do you want to store the session informatio or what ? Please tell your business requirments.
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I have a web application which is similar to group management.So every user will belong to one group.When user logs in I need to refer his group related details like group and and also his user related details such as userid,user name and assigned roles for him.Instead of getting these global details in every form,cant I store them in one place (global.asax) and refer where ever i required.If yes please provide the information and problems with it.
Thanks in advance,
Srinivas Mateti
|
|
|
|
|
if you want to store the information related to the user then you can do at the same place where User gets login. Just fetch the information from the DB for that user and then store it in a Session.
To store it in a single variable, you can create a simple class. just place the variables that would hold the info required by you. now it's very easy. just create the object of this class, assign values to the variables and then place this object in the session. Now access the session variable at any page .
modified on Thursday, September 24, 2009 9:28 AM
|
|
|
|
|
when user gets login successfully and if you are using FormAuthentication then Application_AuthenticateRequest will be fired but it will be in global.asax not global.ajax. i suppose there was a typo mistake(ajax).
|
|
|
|
|
sris 426 wrote: What type of data i can keep in global.ajax file
What kind of file Global.ajax is ? I guess you are asking for Global.asax . if yes, read sashidhar reply.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi!
How can I populate a DropDownList by what I select from another?
I have two DropDownLists named Industry and SubIndustry. The SubIndustry DropDownList should display information by what I have selected in Industry.
I have created a Populate_Industry and Populate_SubIndustry methods and I call the SubIndustry_Method by way of the Industry SelectedIndex_Changed event. I have set AutoPostBack="true" on the Industry DropDownList but the Populate_SubIndustry method won't fire.
I have stepped through my code and everything executes perfect but the information does not appear in the DropDownList. I double checked my databind code so I do not think its me not binding to the control.
Please can someone assist? If you want to see the code please reply and I will gladly post it for you.
Thank you!
Illegal Operation
|
|
|
|
|
Yes, post the code, it's the only way to be sure.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
here is the code:
Variables to check DropDownList State and to get the IndustryId for SubIndustry:
bool LoadSubIndustries = true;
public int IndustryId { get; set; }
Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Populate_Industry();
}
LoadSubIndustries = false;
}
The Populate Methods:
private void Populate_SubIndustry()
{
DataSet dsSubIndustries = lookupManager.GetSubIndsutryByIndustryId(IndustryId);
ddlSubIndustry.DataSource = dsSubIndustries.Tables["Lookup_SubIndustry"].DefaultView;
ddlSubIndustry.DataValueField = "Id";
ddlSubIndustry.DataTextField = "SubIndustry";
ddlSubIndustry.DataBind();
}
private void Populate_Industry()
{
DataSet dsIndustries = lookupManager.GetIndustries();
ddlIndustry.DataSource = dsIndustries.Tables["Lookup_Industry"].DefaultView;
ddlIndustry.DataValueField = "Id";
ddlIndustry.DataTextField = "Industry";
ddlIndustry.DataBind();
}
SelectedIndex_Changed method:
protected void ddlIndustry_SelectedIndexChanged(object sender, EventArgs e)
{
if (LoadSubIndustries == false)
{
IndustryId = (int.Parse(ddlIndustry.SelectedValue.ToString()));
Populate_SubIndustry();
}
}
Illegal Operation
|
|
|
|
|
Steve,
Please ignore. I have found the problem. I have not added the table adapter to my GetSubIndustryByIndustryId method.
Boy do I feel like the idiot!!
Thanks for the quick response!!
Cheers
Illegal Operation
|
|
|
|
|
Ah, happy to be of service.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Have you put a break point on the bolded line:
protected void ddlIndustry_SelectedIndexChanged(object sender, EventArgs e)
{
if (LoadSubIndustries == false)
{
IndustryId = (int.Parse(ddlIndustry.SelectedValue.ToString()));
Populate_SubIndustry();
}
}
to make sure LoadSubIndustries is false? Is it even getting into this event handler? If it's not getting to the event handler, that would indicate the event isn't wired up correctly.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Dear All,
I using ASP.NET with AD. I can connect with my username and password, Can I get all username in AD?
Socheat
|
|
|
|
|
You want to authenticate user from Active Directory ? Or want to list of all user name from AD ?
Read this article, This will help you to find out all the answer.
Howto: (Almost) Everything In Active Directory via C#[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Yes, I want toget all user name from AD
Socheat
|
|
|
|
|
|
I need some help on how to validate the userName and password against a database for a login system in Visual C#? Help!!!!
|
|
|
|
|
First, read this[^]
Second, read this[^]
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: First, read this[^]
I believe you meant this[^].
|
|
|
|
|
I hate it when they don't answer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yep, got the wrong one
only two letters away from being an asset
|
|
|
|