SlideShare a Scribd company logo
Web Application Using c# - Nithiyapriya Pasavaraj Page 1
Web Application Using C# Lab – Creating a Web
Configuration File
Web Application Using c# - Nithiyapriya Pasavaraj Page 2
Web.config
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<appSettings>
<add key="csFee" value="20000"/>
<add key="CS" value="COMPUTER SCIENCE"/>
<add key="bcaFee" value="25000"/>
<add key="BCA" value="BCA"/>
</appSettings>
</configuration>
Course.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
public partial class course : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedItem.Value == "COMPUTER SCIENCE")
{
Label1.Text = ConfigurationSettings.AppSettings["CS"];
Label2.Text = ConfigurationSettings.AppSettings["csFee"];
}
if (DropDownList1.SelectedItem.Value == "BCA")
{
Label1.Text = ConfigurationSettings.AppSettings["BCA"];
Label2.Text = ConfigurationSettings.AppSettings["bcaFee"];
}
Label1.Visible = true;
Label2.Visible = true;
}
}

More Related Content

PPTX
WP REST API - Building a simple Web Application
PPTX
Migrando una app de angular.js a Blazor
PPT
FCPakistan: a case study
PPTX
Learn how to start cooking with Chef!
ODP
AngularJS
PPT
Caching strategy and apc
PPT
Indic threads pune12-improve testing efficiency with selenium webdriver
TXT
New text document
WP REST API - Building a simple Web Application
Migrando una app de angular.js a Blazor
FCPakistan: a case study
Learn how to start cooking with Chef!
AngularJS
Caching strategy and apc
Indic threads pune12-improve testing efficiency with selenium webdriver
New text document

What's hot (18)

PPTX
Introduction to web application – restaurant analogy
PPT
Heavy Web Optimization: Frontend
PDF
HTML & CSS - Le Wagon Bootcamp
PPTX
PDF
HTML & CSS - Le Wagon Bootcamp
PPT
Tour of sh404SEF - SEO and security for Joomla
KEY
a-blog cms 勉強会 NAGOYA 20110718
PPTX
Building High-Performance applications with .NET 5 and Vue JS 3
PDF
ASP.Net MVC ile Web Uygulamaları - 4(Model)
PDF
Battling Google PageSpeed Insights
PDF
How To Install Magento 2 (updated for the latest version)
PPTX
Backbone.js
PDF
Boost Magento perfomance with Queues
PDF
Jquery Cheatsheet
PDF
Building WordPress Client Side Applications with WP and WP-API - #wcmia
PDF
Streamlining Your Applications with Web Frameworks
PPTX
Progressive web app testing
PDF
How to build Client Side Applications with WordPress and WP-API | #wcmia
Introduction to web application – restaurant analogy
Heavy Web Optimization: Frontend
HTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon Bootcamp
Tour of sh404SEF - SEO and security for Joomla
a-blog cms 勉強会 NAGOYA 20110718
Building High-Performance applications with .NET 5 and Vue JS 3
ASP.Net MVC ile Web Uygulamaları - 4(Model)
Battling Google PageSpeed Insights
How To Install Magento 2 (updated for the latest version)
Backbone.js
Boost Magento perfomance with Queues
Jquery Cheatsheet
Building WordPress Client Side Applications with WP and WP-API - #wcmia
Streamlining Your Applications with Web Frameworks
Progressive web app testing
How to build Client Side Applications with WordPress and WP-API | #wcmia
Ad

Similar to Web application using c# Lab - Web Configuration file (20)

PDF
Asp.net
PPT
2310 b 15
PPT
2310 b 15
PPS
01 asp.net session01
PDF
ASP.NET 2010, WebServices Full Example for BCA Students
PDF
asp.net course in pune
PPS
06 asp.net session08
PDF
Asp.net Web Development.pdf
PPTX
Asp.net orientation
PPS
06 asp.net session08
PPS
03 asp.net session04
PPTX
Asp.net Programming Training (Web design, Web development)
PDF
ASP.NET Overview - Alvin Lau
PPSX
01 asp.net session01
PPT
ASP.NET 4.0 Demo
PPT
Introduction to ASP related to basics of asp
PPSX
ASP.Net Presentation Part3
PPS
14 asp.net session20
PPT
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
PPSX
13 asp.net session19
Asp.net
2310 b 15
2310 b 15
01 asp.net session01
ASP.NET 2010, WebServices Full Example for BCA Students
asp.net course in pune
06 asp.net session08
Asp.net Web Development.pdf
Asp.net orientation
06 asp.net session08
03 asp.net session04
Asp.net Programming Training (Web design, Web development)
ASP.NET Overview - Alvin Lau
01 asp.net session01
ASP.NET 4.0 Demo
Introduction to ASP related to basics of asp
ASP.Net Presentation Part3
14 asp.net session20
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
13 asp.net session19
Ad

More from priya Nithya (19)

PPTX
Android Architecture.pptx
PDF
Html server control - ASP. NET with c#
PPTX
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
PPTX
Asynchronous data transfer
PDF
Asp.net state management
DOC
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
DOCX
HTML SERVER CONTROL - ASP.NET WITH C#
DOC
Android LAb - Creating an android app with Radio button
PPTX
ASP.NET - Life cycle of asp
DOCX
Creation of simple application using - step by step
PPSX
Adaptation of tcp window
PPSX
Asp.net Overview
PPSX
Key mechanism of mobile ip
PPSX
Mobile ip overview
PPSX
Features of mobile ip
PDF
Creating a Name seperator Custom Control using C#
PDF
How to Create Database component -Enterprise Application Using C# Lab
PDF
Creating simple component
PPT
Internet (i mcom)
Android Architecture.pptx
Html server control - ASP. NET with c#
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Asynchronous data transfer
Asp.net state management
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
HTML SERVER CONTROL - ASP.NET WITH C#
Android LAb - Creating an android app with Radio button
ASP.NET - Life cycle of asp
Creation of simple application using - step by step
Adaptation of tcp window
Asp.net Overview
Key mechanism of mobile ip
Mobile ip overview
Features of mobile ip
Creating a Name seperator Custom Control using C#
How to Create Database component -Enterprise Application Using C# Lab
Creating simple component
Internet (i mcom)

Recently uploaded (20)

PPTX
IMMUNIZATION PROGRAMME pptx
PPTX
How to Manage Global Discount in Odoo 18 POS
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Odoo 18 Sales_ Managing Quotation Validity
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
PDF
LDMMIA Reiki Yoga S2 L3 Vod Sample Preview
PDF
Sunset Boulevard Student Revision Booklet
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
PPTX
How to Manage Bill Control Policy in Odoo 18
PDF
High Ground Student Revision Booklet Preview
PPTX
vedic maths in python:unleasing ancient wisdom with modern code
PDF
Module 3: Health Systems Tutorial Slides S2 2025
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PDF
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
PPTX
ACUTE NASOPHARYNGITIS. pptx
PPTX
How to Manage Loyalty Points in Odoo 18 Sales
IMMUNIZATION PROGRAMME pptx
How to Manage Global Discount in Odoo 18 POS
Information Texts_Infographic on Forgetting Curve.pptx
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Odoo 18 Sales_ Managing Quotation Validity
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
LDMMIA Reiki Yoga S2 L3 Vod Sample Preview
Sunset Boulevard Student Revision Booklet
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
How to Manage Bill Control Policy in Odoo 18
High Ground Student Revision Booklet Preview
vedic maths in python:unleasing ancient wisdom with modern code
Module 3: Health Systems Tutorial Slides S2 2025
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
Revamp in MTO Odoo 18 Inventory - Odoo Slides
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
ACUTE NASOPHARYNGITIS. pptx
How to Manage Loyalty Points in Odoo 18 Sales

Web application using c# Lab - Web Configuration file

  • 1. Web Application Using c# - Nithiyapriya Pasavaraj Page 1 Web Application Using C# Lab – Creating a Web Configuration File
  • 2. Web Application Using c# - Nithiyapriya Pasavaraj Page 2 Web.config <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <system.web> <compilation debug="false" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <appSettings> <add key="csFee" value="20000"/> <add key="CS" value="COMPUTER SCIENCE"/> <add key="bcaFee" value="25000"/> <add key="BCA" value="BCA"/> </appSettings> </configuration> Course.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Configuration; public partial class course : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedItem.Value == "COMPUTER SCIENCE") { Label1.Text = ConfigurationSettings.AppSettings["CS"]; Label2.Text = ConfigurationSettings.AppSettings["csFee"]; } if (DropDownList1.SelectedItem.Value == "BCA") { Label1.Text = ConfigurationSettings.AppSettings["BCA"]; Label2.Text = ConfigurationSettings.AppSettings["bcaFee"]; } Label1.Visible = true; Label2.Visible = true; } }