Link to home
Start Free TrialLog in
Avatar of inverted_2000
inverted_2000Flag for United States of America

asked on

ASP.NET session variables based on AD account group memberships.

Hey everyone,

I'm getting back into the programming circle and I'm looking for way with the .NET framwork to authenticate session variables with users Active Direcotry accounts.

I'm really looking to break up HR and Payroll session variables based on their AD group membership.

The forms are ASP.NET....I don't know if C# integrates with the ASP style forms or not...if you can please also clarify that for me.

I appreciate it sooooo much.

Thanks guys,
inverted
ASKER CERTIFIED SOLUTION
Avatar of traxion
traxion

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inverted_2000

ASKER

Thanks Dustin,

that all really helps a lot.  I'd like to clear up one more thing if you might do so for me.

ASP.NET is either C# or VBScript.?.?.?  Is that correct?

And the legacy ASP used either JavaScript or VBScript.?.?.?


The form controls...for instance:
<asp:TextBox ID="txt_ForExample" runat="server" />

are the ASP part of ASP.NET...but the true interaction between the server and the client is done with either C# or VBScript?

Thanks a lot again,
inverted
Avatar of traxion
traxion

This is correct.  There are actually several different languages (J# as well).  You can also obtain interpreters for other languages I believe, but here's what happens:

You code in C#, VB .NET, J#, your choosing.  You may precompile the application or the Framework will compile it for you when the pages are hit on the server.  No matter which language you choose, the compiler will compile it into the same common language (MSIL) which is actually what gets executed by the framework.

In fact, if you're an ASP developer, you will find VB .NET much easier to pick up quickly as it's syntactically very similar.  There are just a few things to check the syntax of.

In ASP, to check the length of a trimmed contents of a textbox called "FirstName" you would use:
Dim x, strName
strName = Request.Form("FirstName")
x = Len(Trim(somestring))

In VB .NET you can actually use hte same syntax but you can also do this:
your textbox:  <asp:TextBox id="FirstName" runat="server" />

and in your code:
Dim x As Integer

x = FirstName.Text.Trim.Length

The string functions are executed in order, so it allows you serverside access to the contents of the textbox using the same functions.
x = Len(Trim(FirstName.Text)) is also valid, but FirstName.Text.Trim.Length is a bit more OO looking.

Hope this clears things up a bit!  If there's anything else you want me to elaborate on, feel free to ask.
Thanks a million because you have cleared up a lot for me&I wish I could buy you lunch at least cause Ive been wanting to confirm these questions for a long time.  
Ive got all of these books on my shelf&ASP.NET, VB.NET etc&.but Ive been a systems admin for the past few years and was a ColdFusion programmer in the past.
Ive got a new job opportunity to be 50/50 systems admin / programmer and I want to start programming again and I needed to clear these things up first so at least I look like I know what Im doing (o:
Anywho& thanks a million.  You help is priceless.
Thanks!  :)  If you're getting back into it and want a great book, I very highly recommend ASP .NET 2.0 Unleashed by Stephen Walther:
http://www.amazon.com/ASP-NET-2-0-Unleashed-Stephen-Walther/dp/0672328232/ref=sr_1_1/104-7013489-7303105?ie=UTF8&s=books&qid=1186758064&sr=8-1

I bought it for myself as it is one of the few .NET books that concentrate only on web development.  The book samples are all in VB but it also includes all samples in C# on the accompanying CD.  It's a great read and does an excellent job of explaining things as it goes as well as providing samples that can be used in the real world.  A great read!   800+ pages with a good Appendix / Index.

Thanks,

Dustin