Simple insert and Gridview in webservices

Simple Insert in webservices:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;

namespace webservices
{
    /// <summary>
    /// Summary description for sample
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class sample : System.Web.Services.WebService
    {

URL REWRITING IN ASP.NET (OR) HOW TO HIDE .ASPX

URL REWRITING IN ASP.NET (OR) HOW TO HIDE .ASPX(VS 2012 OR VERSION 4.5)


This article how to hide .aspx in version 4.5

step:1

visual studio 2012--> file--->new project--->solution explore---> add reference--->system.web.routing

WEBUSER CONTROL

HOW TO CREATE WEBUSER CONTROL

VISUAL STUDIO->SOLUTION EXPLORE->ADD NEW ITEM->WEBUSERCONTROL


WEBUSERCONTROL EXTENSTION--ASCX

Webusercontrol.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="usercontrol.WebUserControl1" %>
<table>
<tr><td><asp:Label ID="labname1" runat="server" Text="Name"></asp:Label></td><td>:</td><td><asp:TextBox ID="txtname1" runat="server" ></asp:TextBox></td></tr>
<tr><td><asp:Label ID="labsal" runat="server" Text="Salary"></asp:Label></td><td>:</td><td><asp:TextBox ID="txtsal" runat="server" ></asp:TextBox></td></tr>
<tr><td></td><td></td><td><asp:Button ID="btemp" runat="server" Text="save"
        onclick="btemp_Click" /></td></tr>


WEB SERVICE IN ASP.NET

BASIC IN WEB SERVICES.


HOW TO ADD TWO VALUE IN WEB SERVICES USING ASP.NET IN C#


Visuval studio 2012àfile-ànew project-àsolution floder-àadd new item-àwebservices.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace ws
{
    /// <summary>
    /// Summary description for WebService1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class WebService1 : System.Web.Services.WebService
    {

        [WebMethod]
        public int Add(int a, int b)
        {
            return a + b;
        }
    }
}

GOOGLE LANGUAGE TRANS LATER IN ASP.NET WEBSITE

ASP.NET WEBSITE LANGUAGE TRANS LATER:

REGISTER IN THIS LINK:
http://translate.google.com   (website translate)(register or gmail account)


INSERT UPDATE DELETE USING STORED PROCEDURE

INSERT UPDATE DELETE USING STORED PROCEDURE



STORED PROCEDURE


ALTER procedure RegIns(
@id int,
@username varchar(25),
@Password varchar(35),
@Count int

)
as
begin
if @count=1
begin
update reg set  Password=@Password ,username=@username where id=@id
end
else if @count=2
begin

LISTVIEW IN ASP.NET USING C#

INSERT,UPDATE,DELETE IN LIST VIEW

LIST.ASPX


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="list.aspx.cs" Inherits="listview.list" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>