Razor Examples
Hello.cshtml @{ var strName = ""; if(IsPost) { strName = "Hello welcome...
MVC Folder Structure
Application information Properties References Application folders ...
n-Tier Architecture in ASP.NET n-Tier Architecture...
Architecture is an important feature and the very first step in the development of an application. n-Tier the term is used for...
OOPS and examples
All the programming languages supporting Object oriented Programming will be supporting these three main concepts: 1. Encapsulation 2. Inheritance 3. Polymorphism Encapsulation...
3 Tier Login Example
UI: Login Page public partial class login : System.Web.UI.Page { businessLogic obj = new businessLogic(); protected void button_Click(object sender, EventArgs e) {...
How to call jQuery code only before the ASP.NET postback
"PostBack is the name given to the process of submitting an ASP.NET page to the server for processing ." protected void Page_Load(object...
Consistent Look Razor in MVC
@{ Layout = null; } <!DOCTYPE html> <html> <head> <title>Main Page</title> <link href="@Href("../../Content/styles/Style.css")" rel="stylesheet" type="text/css" /> </head><body> <div class="header">This is...
Handling Errors In MVC
@{var dataFilePath = "~/dataFile.txt"; var fileContents = ""; var physicalPath = Server.MapPath(dataFilePath); var userMessage = "Hello world, the time is "...
Objects and Collections
Objects and Collections Page Objects The most basic object in ASP.NET is the page. You can access properties of the page object...
Conditional Logic and Loops in MVC
Conditional Logic and Loops ASP.NET server code lets you perform tasks based on conditions and write code that repeats statementsa specific number...
Working with File and Folder Paths in Code in MVC
@{ Layout = null; } <!DOCTYPE html> <html> <head> <title>Files</title> </head> <body> <div> ...
Add-numbers-in-mvc
@{ Layout = null; } <!DOCTYPE html> <html lang="en"> <head> <title>My Title</title> <meta charset="utf-8" /> <style type="text/css"> body ...
The Top 8 Programming Tips in MVC
1.You add code to a page using @ Character The @ character starts inline expressions, single statement blocks, and multi-statement blocks: <!--...
Current System Time Display in MVC
@{ Layout = null; } <!DOCTYPE html> <html> <head> <title>Time</title> </head> <body> <div> ...
Copy Microsoft.ReportViewer.ProcessingObjectModel....
You can follow the following steps to copy it from GAC (Global Assembly cache): COPY Microsoft.ReportViewer. ProcessingObjectModel 1. Open a command prompt...
DatePicker in MVC
View @model DatePickerTemp.Models.FooEditModel @{ ViewBag.Title = "Edit"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2> Edit</h2> @Model.Message @using (Html.BeginForm())...
Gridview in MVC
Model public DataSet displayPageLoad(Int64 opt6) { if (cn.State == ConnectionState.Open) ...
RowHeader display in VB.NET windows application
Private Sub dgvSubscriptions_RowPostPaint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles dgvSubscriptions.RowPostPaint Try ...
Windows Media Player integrate in C# windows application
videourl = dt.Rows[0]["videourl"].ToString(); axWindowsMediaPlayer1.URL = videourl; ...
SlideShow in C# windows application using picturbox
string[] Files; var root = Application.ExecutablePath;...
Images upload and save to folder in C# windows application
private void btnBrowseimage_Click(object sender, EventArgs e) { try ...
Font Settings Save to Database in C# windows application
private void btnfont_Click(object sender, EventArgs e) { try ...
Color Settings save to Database in C# windows application
private void btnColor_Click(object sender, EventArgs e) { try ...
Retrieve image, font and color settings from Database in C# windows application
private void btnpreview_Click(object sender, EventArgs e) { try ...
Mail Sending in asp.net using System.Net.Mail
This summary is not available. Please click here to view the post. ...
Save Image to Database as Binary using FileUpload in asp.net
if (fupimage.HasFile) { //getting length of uploaded file...
MySQL DATE_FORMAT() Function
Definition and Usage The DATE_FORMAT() function is used to display date/time data in different formats. Syntax DATE_FORMAT(date,format) Where date is a valid...