Click here to Skip to main content
15,898,222 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: How to select a range of text using java script ? Pin
Abhijit Jana7-Jul-08 3:20
professionalAbhijit Jana7-Jul-08 3:20 
AnswerRe: How to select a range of text using java script ? [modified] Pin
Sherin Iranimose7-Jul-08 3:35
Sherin Iranimose7-Jul-08 3:35 
AnswerRe: How to select a range of text using java script ? Pin
Abhijit Jana7-Jul-08 3:51
professionalAbhijit Jana7-Jul-08 3:51 
GeneralRe: How to select a range of text using java script ? Pin
Abhijit Jana7-Jul-08 4:14
professionalAbhijit Jana7-Jul-08 4:14 
GeneralRe: How to select a range of text using java script ? Pin
Sherin Iranimose7-Jul-08 4:21
Sherin Iranimose7-Jul-08 4:21 
GeneralRe: How to select a range of text using java script ? Pin
Abhijit Jana7-Jul-08 4:45
professionalAbhijit Jana7-Jul-08 4:45 
GeneralRe: How to select a range of text using java script ? Pin
Sherin Iranimose7-Jul-08 5:05
Sherin Iranimose7-Jul-08 5:05 
QuestionCreate login page using asp.net C#? Pin
katelva7-Jul-08 1:07
katelva7-Jul-08 1:07 
Hi,

I am newbie to asp.net C#, so I am not sure how to read the data from SQL Express database and validate the user input from the database using asp.net C#. Mostly from book and internet are in VB language. I don't want use login control in asp.net C#. The below is I create the main page myself. In vb,I am ok with it but C# not good.

Anyone can help and any recommended website for asp.net C#?

The bottom is my source code where I have tried to use SQLdataReader:
aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Navigation" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Footer" Runat="Server">
</asp:Content>

<asp:Content ID="Content5" runat="server"
contentplaceholderid="RightTopContent">
<asp:Image ID="Image1" runat="server" Height="26px" Width="162px" />
<br />
Username :<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
<br />
Password :<asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
<br />
<asp:Button ID="btnSubmit" runat="server" onclick="btnSubmit_Click"
Text="Login" />
<br />
</asp:Content>
<asp:Content ID="Content6" runat="server"
contentplaceholderid="RightMiddleContent">
</asp:Content>
<asp:Content ID="Content7" runat="server" contentplaceholderid="MainContent">
</asp:Content>
aspx.cs
protected void btnSubmit_Click(object sender, EventArgs e)
{
string uname = txtUserName.Text;
string pwd = txtPassword.Text;

string connectionString = "Data Source= .\\SQLEXPRESS;"
+ "AttachDbFilename=\"C:\\Documents and Settings\\kathy\\My Documents\\Visual Studio 2008\\WebSites\\WebSite1\\App_Data\\salon.mdf\";"
+ "Integrated Security=True;"
+ "User Instance=True";
SqlConnection myConnection = new SqlConnection(connectionString);
SqlCommand cmd = myConnection.CreateCommand();

cmd.CommandText = "SELECT * FROM [Customer]";
myConnection.Open();

SqlDataReader dr = cmd.ExecuteReader();

while (dr.Read())
{
if (dr.GetOrdinal("UserName").ToString() == txtUserName.Text)
{
Response.Write("Heelo");
//dr.Close();
}
//dr.Close();
myConnection.Close();
}
AnswerRe: Create login page using asp.net C#? Pin
Domenic Denicola7-Jul-08 7:19
Domenic Denicola7-Jul-08 7:19 
QuestionCannot call multiple web service methods using ASP.NET AJAX at the same time Pin
Domenic Denicola7-Jul-08 1:06
Domenic Denicola7-Jul-08 1:06 
Questiongridview Problems Pin
Bharani_Ram7-Jul-08 0:11
Bharani_Ram7-Jul-08 0:11 
AnswerRe: gridview Problems Pin
Gayani Devapriya7-Jul-08 3:08
Gayani Devapriya7-Jul-08 3:08 
GeneralRe: gridview Problems Pin
Bharani_Ram7-Jul-08 18:21
Bharani_Ram7-Jul-08 18:21 
Questionproblem with sessions in common methods class Pin
eyeseetee6-Jul-08 23:43
eyeseetee6-Jul-08 23:43 
AnswerRe: problem with sessions in common methods class Pin
Imran Khan Pathan6-Jul-08 23:55
Imran Khan Pathan6-Jul-08 23:55 
GeneralRe: problem with sessions in common methods class Pin
eyeseetee6-Jul-08 23:57
eyeseetee6-Jul-08 23:57 
GeneralRe: problem with sessions in common methods class Pin
N a v a n e e t h7-Jul-08 0:32
N a v a n e e t h7-Jul-08 0:32 
GeneralRe: problem with sessions in common methods class Pin
eyeseetee7-Jul-08 0:52
eyeseetee7-Jul-08 0:52 
Questionhow to disable link button ? Pin
kathyani6-Jul-08 23:40
kathyani6-Jul-08 23:40 
AnswerRe: how to disable link button ? Pin
eyeseetee6-Jul-08 23:44
eyeseetee6-Jul-08 23:44 
GeneralRe: how to disable link button ? Pin
kathyani6-Jul-08 23:55
kathyani6-Jul-08 23:55 
GeneralRe: how to disable link button ? Pin
eyeseetee6-Jul-08 23:58
eyeseetee6-Jul-08 23:58 
GeneralRe: how to disable link button ? Pin
kathyani7-Jul-08 0:02
kathyani7-Jul-08 0:02 
GeneralRe: how to disable link button ? Pin
Sherin Iranimose7-Jul-08 0:03
Sherin Iranimose7-Jul-08 0:03 
GeneralRe: how to disable link button ? Pin
kathyani7-Jul-08 0:07
kathyani7-Jul-08 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.