How to pass parameter value to Stored Procedure ?

Just Drag and drop one grid view control on your web page.

In Aspx Page:-

[code]
Imports System.Data
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim command As New SqlCommand
Dim StrConnection As New SqlConnection("server=servername;database=databasename;uid=userid;pwd=password;") 'Give your connection string
Dim myDataReader As SqlDataReader
Dim Res As New StringBuilder
Dim da As SqlDataAdapter
command.Connection = StrConnection
command.Connection.Open()
command.CommandText = "ReturnMultipleValues" ' Give your sp name
Command.CommandType = CommandType.StoredProcedure
command.Parameters.AddWithValue("@ParameterName1", "YourValue")
command.Parameters.AddWithValue("@ParameterName2", "YourValue")
Dim dt As New DataTable
myDataReader = command.ExecuteReader()
dt.Load(myDataReader)
End Sub
End Class

[/code]

What are the main components of WCF?

The main components of WCF(Windows communication Foundation) are

1. Service class
2. Hosting environment
3. End point
More reference about this concept
http://www.dotnetfunda.com/articles/article221.aspx#WhatarethemaincomponentsofWCF

Difference between WCF and Web services?

Web Services

1.It Can be accessed only over HTTP
2.It works in stateless environment

WCF(Windows Communication Foundation)

WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services:
IIS
WAS
Self-hosting
Managed Windows Service

How to use asp.net Multiview control?

The Multiview control acts as a stand alone Panel like control ,or can be a container for multiple panle like control called views.Using the new multiview control with the view control allows developers an easier way to toggle between panels.


take the below example
[code]

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
MultiView1.ActiveViewIndex = 0
End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
MultiView1.ActiveViewIndex = 1
End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
If txtPassword.Text <> "" And txtUsername.Text <> "" Then
Response.Redirect("")
Else
Response.Write("Enter Correct User Name and Password")
End If
End Sub

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
Response.Write("Password has been sent to your mail id")
End Sub
End Class

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="LinkButton1" runat="server">Login Screen</asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server">Forget Password</asp:LinkButton>
<br />
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">
User Name
<asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
<br />
Pass Word
<asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
<br />

<asp:Button ID="Button2" runat="server" Text="Button" />
</asp:View>
<asp:View ID="View2" runat="server">
<br />
<br />
Email ID <asp:TextBox ID="txtFEmailid" runat="server"></asp:TextBox>

<asp:Button ID="Button3" runat="server" Text="Get Password" />
<br />
</asp:View>
</asp:MultiView>
</div>
</form>
</body>
</html>



[/code]

How to Create Text file using asp.net?

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Give your new file path
FileInfo t = new FileInfo("C:/WebSite10/test.txt");
StreamWriter Tex = t.CreateText();
//Enter your text with in writeline
Tex.WriteLine("How to create Text file using asp.net");
Tex.WriteLine("www.renganathan1984.blogspot.com");
//Add new line in your text file
Tex.Write(Tex.NewLine);
Tex.WriteLine("Trichy");
Tex.WriteLine("Thiruvellarai");

Tex.Close();
Response.Write("File Succesfully created!");
}

}