Uncategorized

ASP.Net Web Development with C using Visual Studio 2010

Lab 1 – ASP.NET Introduction

Build a web application that merges the content of 2 text boxes and displays the result in a label.

Reading: How to create a asp.net website in visual studio 2010

  1. Show media clip. Click bottom right for full screen mode.
  2. Create an empty web application project named “Calculator”
  3. Add two text fields, a label and a button to the Default.aspx designer.
  4. In the button’s click event, add the following code (in one line):Label1.Text = Integer.Parse(Me.Textbox1.Text) + Integer.Parse(Me.Textbox2.Text)
  5. Extend the application to allow subtraction, multiplication and division.
  6. Extend the application to validate the values ​​entered in the text boxes.
  7. Test and save the application.
  8. li>

  9. View code file.

Lab 2 – Managing the User Interface

Build the skeleton of a website using master page, themes and navigation.

See also: How To Create A Forum Website And Make Money Online

  1. Create an empty website called RentalLibrary y:
  • First create the folder (give it the website name) where you want to save your website.
  • Go to the File menu.
  • Select New and then Website.
  • Make sure you select File System in the list box next to Web Location (below on the left of the window).
  • Then navigate to the folder you created in the first step.
  • Select ASP.NET website and click Click OK.

Add a theme called SimpleTheme. To do this, right-click the project in Solution Explorer, and then select Add > Add ASP.NET Folder > Theme from the context menu. Add a label skin file to the theme. Name this Label.skin. To do this, right-click on SimpleTheme and then select Add>New Item…>Skin File. Add this label element at the bottom of the skin file: Add a Web.SiteMap file to the application. To do this, right-click the project in Solution Explorer, then select Add>New Item…>Sitemap. Delete the existing Master Page and then add a different one to the application. Right-click the project in Solution Explorer, then select Add>New Item…>Master Page. Delete the first ContentPlaceholder elements in the title of the master page. Only one ContentPlaceholder is required. Add a Label control to the master page, but make sure it’s on top of the remaining ContentPlaceholder. Set the label’s SkinID attribute to “Title”. Add the text RentalLibrary.com to the label. Drag SiteMapDataSource and TreeView controls from the toolbox to the master page. Again, make sure that these are placed above the ContentPlaceholder. Set the TreeView data source to a sitemap data source. Set these SiteMapDataSource properties: StartFromCurrentNode=False ShowStartingNode=True Add a web form using the master page named Default.aspx. Select the master page that you added in step 3. Set Default.aspx as the application home page. Add the text “Welcome to RentalLibrary.com” in the content elements of the page. Set the site theme to SimpleTheme by adding this element to the web.config file:

See also  How to Make Your WordPress Blog Completely Private (4 Ways)

Place this element inside the element.

Add three more web form with master page. Name this:

  • Games.aspx.
  • ContactUs.aspx
  • DVD.aspx.

Edit the Web.SiteMap, to include navigation on all four pages of the site. Include the URL, title, and description of each page. Test the site.

Lab 3 – Website Configuration Store application settings in web.config file. The name of a mail server is stored in this configuration file. It can then be easily modified without recompiling the application.

  1. Create an empty web application project named Configuration. Add a web form named Default.aspx. and set it as home page.
  2. Save application settings by adding this element to web.config file:

Place this element just below the element.

Drag a text box from the Toolbox onto the Default.aspx designer. Import the Configuration namespace by adding this directive at the top of Default.aspx.cs. View the application settings on the default web page. Access the settings through the WebConfigurationManager object. Add this Page_Load event handler to Default.aspx.cs: Run the website to verify that the application setting appears. View code file.

Lab 4 – Membership and Personalization

See also: Free vs Premium WordPress Themes (Pros and Cons)

Create a web application that allows authenticated users to change their personal settings. An ASP.Net database is created to store usernames. Individual users can then store and retrieve a personal email address.

  1. First you need to aspnet_regsql.exe tool in C:WindowsMicrosoft.NetFramework. This is located either in the V4.0.30319 folder or in the V2.0.50727 folder, depending on whether you are running version 4 of the framework or earlier.

    When you run the application, a security database called aspnetdb is created. This is then automatically saved in SQL Server 2008.

  2. Next, go to the Server Explorer (accessed from the View menu in Visual Studio) and paste You add a connection to the aspnetdb database.
  3. Create an empty website called Membership.
  4. Open the Website administration tool and configure security (this tab was enabled by connecting to the aspnetdb database). Add a user’s credentials.
See also  How to make a 3D website with VECTARY

Add profile settings to web.config to store an email address (with a default value of [not set]).

Make sure this is under the tag.

Add a Page (Profile.aspx) with a label added. In Page_PreRender, add code to set the label’s text to the email address from the profile. View code file. Add another page, EditProfile.aspx, and link to it from Profile.aspx. Add a text box on this page for the user to enter an email address. Save these values ​​in the profile. View code file. Try the

Back to Top

See also: How to Make a Festival Wishing Website Script Free (Full Guide)

site.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button