C# KB: WebForms Coding Tasks Topic



13 Articles Found in the WebForms Coding Tasks Topic 

  KB Article  

Mike Prestwood
1. ASP.NET Extension Information This article describes the ASPX file extensions.
10/24/2002, and updated 12/23/2008

KB Post
Nothing New Since Your Last Visit
9350
Hits

C# (Visual C# & VS.Net)

Adam Lum
2. Changing the Trust Level in your ASP.NET Web Applications

To restrict what an ASP.NET application can and cannot access and to provide an additional level of application isolation in a hosted environment, access security can be used. You do this by configuring the element in the machine-level Web.config file located in the following folder: %windir%\Microsoft.NET\Framework\{version}\CONFIG.

6/8/2006, and updated 1/28/2009

KB Post
Nothing New Since Your Last Visit
53972
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
3. Consuming an RSS feed in ASP.NET

Using this quickie code snippet, you can attach an ASP:Gridview  to an external RSS Feed.

All you need to accomplish this is the URL of a usable feed.

5/1/2010

Code
Nothing New Since Your Last Visit
18940
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
4. FileUpload

Demonstrates the code required to retreive and store a file uploaded via an ASP FileUpload object.  Assumes you have a web form with a FileUpload, a button, and a label control.  Also, this example stores the file uploaded into a folder named "Uploads" which is assumed to pre-exist.

3/6/2008, and updated 11/3/2008

Code
Nothing New Since Your Last Visit
6821
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
5. Get all components in an ASPX page recursively

Retrieves an array of all the components of any given type within a starter control (such as a page, table, panel, etc.)  This routine is recursive and will keep iterating down until all the embedded components are found.

This C# code can be invoked to produce an array as  follows:

CheckBox[] myCheckboxes = GetAllCheckboxes(Table1);
3/8/2008, and updated 2/24/2009

Code
Nothing New Since Your Last Visit
10667
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
6. Getting Website Root Directory in C# ASP.NET

This code shows how to ask the webserver where the site's root directory is, and how to convert a relative path (like /Uploads) to the full filesystem path.  This will work across environments (i.e. Development/QA/Production).

12/12/2008, and updated 10/24/2009

Code
Nothing New Since Your Last Visit
18266
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
7. How to open a URL in a pop-up window. Every now and then you want a link to open not only in a new browser, but you may want to give the new window the appearance of a pop-up window. This ASP/Javascript method gives you a lot of control and is easy to figure out and implement.
2/9/2008, and updated 7/1/2009

KB Post
Nothing New Since Your Last Visit
49911
Hits

C# (Visual C# & VS.Net)

Wes Peterson
8. MVC Coming to ASP .NET The Model/View/Controller architecture is popular in windows desktop applications. Soon it will come to ASP .NET, as well.
3/24/2008

News
Nothing New Since Your Last Visit
5989
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
9. Programattically Adding Content to Web Pages in C# Visual web developer offers a few different ways to add dynamic content to a web page. This will help you choose which one is right for your application. In General, there are Data-Aware components, Labels, and PlaceHolders.
12/12/2008

Article
Nothing New Since Your Last Visit
8587
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
10. Sending email from C#.NET in 5 lines of code.

First, you must add the System.Net.Mail namespace to your project. There are 2 objects we use to send the email, a MailMessage, and an SMTPClient.

This code works from C# projects or from ASP.NET projects. Make sure your mail server is set to relay messages for whoever might be sending the message. In my case my webserver is sending through my exchange server so I had to tell exchange to relay for my webserver.

2/5/2008

Code
Nothing New Since Your Last Visit
7430
Hits

C# (Visual C# & VS.Net)

Mike Prestwood
11. The Official Microsoft ASP.Net Site http://www.asp.net/
5/28/2008

Link
Nothing New Since Your Last Visit
7149
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
12. Using a Legacy Windows DLL in ASP.NET

This article will show how to access a function in a legacy COM dll from a ASP.NET web page. By legacy I mean a dll that is not a .NET managed code dll (a Win32 DLL). 

11/5/2009

KB Post
Nothing New Since Your Last Visit
11383
Hits

C# (Visual C# & VS.Net)

Bryan Valencia
13. Using GenericIdentity for Cross Platform Authentication in the .NET framework

When designing a WinForms application, the most straightforward way to authenticate a user is using NTLM or Active Directory using WindowsIdentity.GetCurrent. Over the Internet, you can use the whole ASP.Net security setup with Membership.GetUser. The GenericPrincipal object works well when you deploy to a mixed web/WinForms environment. See new GenericIdentity.

11/2/2009

KB Post
Nothing New Since Your Last Visit
15002
Hits

C# (Visual C# & VS.Net)

Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).
www.prestwood.com For service: 916-726-5675
or support@prestwood.com
Copyright (C) Prestwood IT Solutions.
All Rights Reserved.
Printed 6/4/2020