Monday, July 29, 2013

2-Tier architecture in .net

1.In this architecture application required things placed into two systems is called "2-Tier Architecture" or client server application
2.Client server architecture is recommended when application is running on different systems with centralized data.in 2-tier business logic is placed with in each system,this repetition are be avoided
3.by maintaining business logic with database server in the form of stored subprogram
4.Maintain business logic with database server is called "2 and half tier architecture
5.When it comes to enterprise level the number of clients will be more (or) client will be outside organization network.In this case maintaining business logic with data base server in not recommended for following reason
i.More burden on database,it will effect the performance

Bind data to Asp.net text box using jquery

Title: JQuery bind data to asp.net text box using Blur function

Description:
As per previous articles we have gone through different kind of data binding examples using jquery in asp.net.Now here we will learn about the usage of jquery functionality for web control.

Example:
Now i would like give an example to set the data to Text box in asp.net using jquery.This application will use to  set the food orders.As per requirement we need to assign the value to text box control based on food category Id.To accomplish this task  i have utilized  Jquery script function i:e Blur() which make the functionality what ever we used inside of it

$(document).ready(function() {
$("#<%= txtOrderList.ClientID %>").blur(function(){
var orderList = $(this).val();
$("#<%= txtOrderList1.ClientID %>".val(orderList); 
});

The above script will will bind the data to text box when the other text box focus has moved.You can use this functionality as per requirement very quickly.
This article may help you a lot..Keep visit my website

Wednesday, July 24, 2013

Creating Database WithOut GUI in asp.net

Title:Create new data base using dot net framework 

1.With in object explorer right click on the database note and choose new database to open new database dialog box
2.In that new database dialog box at the database name option provide a name to the database and keep the owner as the default
3.By default one data filer and one log file are created automatically and will be shown in as table when you ant to create additional files and log files.
4.Click on add button at the bottom of the table.The table provides the first column name that can be used to specify logical name of the file .
5.File type column to specify whether the data file belongs to primary or secondary file group and the initial size column to specify initial memory to be allocated to the file
6.Use the auto growth column to specify how much memory to be incremented to the file.When it names additional memory and the maximum limit for the file.
7.To change these option click on the button on right side of the column .Auto growth that open a dialog box with in they dialog box specify the file growth and max size and click on OK button
8.Use  the column path to specify the physical path where you want to save the file to change the path ,click on the button on right side of the column path
9.After specifying the all the files required for the data base click o OK button to complete the Creation of database and click the dialog box


Tuesday, July 23, 2013

Serverside programming in Asp.net

1.All programs that are written as html/Js are executed in client system only.
2.The role of server for these programs is simply send a copy of program to client browser and its JS independent exceeds the code in client
3.Now when we write server side programs the program will be executed at server only .
4.The result will be sent back to client .All client side ans server side programs are based on execution only.
5.In web application extension are very important.
6.Many server side  environment are provided to develop server side scripting and web application

Friday, July 19, 2013

Components of .net framework

Many of the updated and code related things have discussed on er-liar. In this post i just give some basic Concepts of .net framework.
The components of .net frame work:

1.Common Language Run time(CLR)
2.Base class library
3.Framework Class Library

Components of CLR:
1.Common language specification(CLS)
2.common type system(CTS)
3.garbage collector
4.Just in time

Thursday, July 18, 2013

Bind data to RadioButtonList with arraylist in asp.net

Title:
How to bind data to web server control using array list in asp.net using c#

Description:
Array list can hold list of items of similar data type.When  we want  declare the array list with specific size,no need to set the size of array list,because it can be re sizable automatically .

Example:
The below example will show how to add data statically and dynamically to radio button through array list.But  the binding concepts are also utilize for bind data to this standard control..Later articles i would like give all methods regarding array list

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ArrayList listNum = new ArrayList();
listNum.Add("b");
listNum.Add("h");
listNum.Add("a");
listNum.Add("k");
listNum.Add("r");
rbNumber.DataSource = listNum;
rbNumber.DataBind();
}
}
I hope it is helping for you.Thanks for coming and visit again

Monday, July 15, 2013

how to compare two xml files in asp.net using c#

Title:How to compare XML files in Asp.net using C#

Description:

Now i would like to give an examples on Comparing of XML documents using C# code.Asp.net provide an algorithm which is "hash algorithm",can be used for encryption.So based on those methods i will do the comparison of files In the below method i have use two parameters which indicates the path of XML files

Examples:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Security.Cryptography;

private void CompareXMLDocumnet(string ActualDocumnet,string GenratedDocument)
{
if (File.Exists(ActualDocumnet) && File.Exists(GenratedDocument))
{
HashAlgorithm HA = HashAlgorithm.Create();
FileStream XmlFstream1 = new FileStream(ActualDocumnet, FileMode.Open);
FileStream XmlFstream2 = new FileStream(GenratedDocument, FileMode.Open);
byte[] Actual_Xmlhash1;
byte[] Genrated_Xmlhash2;
Actual_Xmlhash1= HA.ComputeHash(XmlFstream1);
Genrated_Xmlhash2= HA.ComputeHash(XmlFstream2);
XmlFstream1.Close();
XmlFstream2.Close();
if (Convert.ToBase64String(Actual_Xmlhash1) == Convert.ToBase64String(Genrated_Xmlhash2))
{
Response.Write(" similar="">
}
else
{
throw new Exception("Files are different");
}
}
}

Sunday, July 14, 2013

get the current month and year in asp.net

Title:How to get current month and year in asp.net using c#.net

Description:
As per previous articles we have seen how get month and year using JQuery. Now i would like to explain and give the example on the same concept in c#.net.The C#.net provide the object "Date Time" which has some properties to get the retired data.As per our discussion i will use the two methods to get the current month and year.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
int year = DateTime.Now.Year;
int month = DateTime.Now.Month;
int date = (DateTime.Now.Day)+2;
Response.Write(year.ToString()+ month.ToString()+date.ToString());
}
}

Wednesday, July 10, 2013

New features in Asp.net MVC 5

Erliar i have given Asp.net MVC4 related information with examples. Now the new version has came which is MVC 5 with new features.The below link will give the complete tutorial of MVC 5 with examples

Monday, July 1, 2013

Get dropdownlist selcted value in gridview in Asp.net

Title:
how Get Drop down List selected value  in grid view using c# in asp.net
Requirement: 
.Frame Work and Sql Server
Explanation:
Here i will show how to fire selected index event of drop down in grid view.When we work with drop down list in grid view ,Most  of  the confusion about how to get the selected value of DDL.By using this event(SelectedindexChanged) we can do it.
As per requirement have to display details of selected record details in report page.By using this ,will get Drop down selected value in grid view. In the above i have fetched the drop down list selected value which in grid view.

protected void ddlorders_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewRow GvOrderrow= (GridViewRow)ddlorders.NamingContainer;
DropDownList ddlOrdr_name= ((DropDownList)(GvOrderrow.FindControl(“ddlorders"))).SelectedValue;
if((ddlOrdr_name.SelectedValue.ToString()) =="")
{
Response.Write("No order Exist");
}
else
{
Respose.Redirect("Report.aspx?order='"+ CurrentOrdr+"'");
}


Bel