Click here to Skip to main content
15,896,726 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Viewing password Pin
larsp77727-Aug-13 23:57
larsp77727-Aug-13 23:57 
GeneralRe: Viewing password Pin
Richard MacCutchan28-Aug-13 1:08
mveRichard MacCutchan28-Aug-13 1:08 
GeneralRe: Viewing password Pin
larsp77728-Aug-13 1:29
larsp77728-Aug-13 1:29 
GeneralRe: Viewing password Pin
Richard MacCutchan28-Aug-13 1:52
mveRichard MacCutchan28-Aug-13 1:52 
GeneralRe: Viewing password Pin
larsp77728-Aug-13 2:01
larsp77728-Aug-13 2:01 
QuestionCalling WCF Method Using Jquery ajax Pin
Chandra Sekhar.bs23-Aug-13 2:07
professionalChandra Sekhar.bs23-Aug-13 2:07 
SuggestionRe: Calling WCF Method Using Jquery ajax Pin
Richard MacCutchan23-Aug-13 2:59
mveRichard MacCutchan23-Aug-13 2:59 
QuestionProblems in asp.net website after publishing Pin
Arun kumar Gautam23-Aug-13 0:08
Arun kumar Gautam23-Aug-13 0:08 
I created asp.net website who is holding a login page,
Here is the code behind of my login page

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using DbProjectLibrary;

public partial class Login : System.Web.UI.Page
{
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString.ToString();
DBClass db = new DBClass();
protected void Page_Load(object sender, EventArgs e)
{

}
protected void loginbtn_Click(object sender, EventArgs e)
{
string type="Admin";
string get_login = "select * from login where Type='" + type + "'";
DataTable dt = db.get_data(get_login, type, constr);
//gview.DataSource = dt;
//gview.DataBind();
string user = usertxt.Text;
string pass = Passwrdtxt.Text;
string username = dt.Rows[0][1].ToString();
string password = dt.Rows[0][2].ToString();
if (username == user.ToLower() && password == pass)
{
Session["login"] = username;
Response.Redirect("~/Profiles/Default.aspx?type=Admin");

}
else
{
errlbl.Text = "You are not authorized to login";
}
}
}

when i run this code using vs 2012 than it runs perfectly
but when i publish it online and try to run it through iis than it shows that error

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'DBClass' could not be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 9: public partial class Login : System.Web.UI.Page
Line 10: {
Line 11: DBClass db = new DBClass();
Line 12: protected void Page_Load(object sender, EventArgs e)
Line 13: {

can anyone help me with it
AnswerRe: Problems in asp.net website after publishing Pin
Blikkies23-Aug-13 1:00
professionalBlikkies23-Aug-13 1:00 
GeneralRe: Problems in asp.net website after publishing Pin
Arun kumar Gautam23-Aug-13 1:14
Arun kumar Gautam23-Aug-13 1:14 
GeneralRe: Problems in asp.net website after publishing Pin
Forbiddenx23-Aug-13 6:27
Forbiddenx23-Aug-13 6:27 
QuestionUsing Oracle Session Id in asp.net Pin
Chandra Sekhar.bs22-Aug-13 19:31
professionalChandra Sekhar.bs22-Aug-13 19:31 
QuestionHow to send excel attachment mail which is converted from datatable without saving to system in asp.net Pin
ven75322-Aug-13 8:07
ven75322-Aug-13 8:07 
AnswerRe: How to send excel attachment mail which is converted from datatable without saving to system in asp.net Pin
Richard Deeming27-Aug-13 3:32
mveRichard Deeming27-Aug-13 3:32 
QuestionSMTP Return-Path Pin
Blikkies21-Aug-13 21:54
professionalBlikkies21-Aug-13 21:54 
AnswerRe: SMTP Return-Path Pin
Richard Deeming27-Aug-13 3:35
mveRichard Deeming27-Aug-13 3:35 
Question.Net Certification Pin
Chandra Sekhar.bs21-Aug-13 20:53
professionalChandra Sekhar.bs21-Aug-13 20:53 
AnswerRe: .Net Certification Pin
Thomas Daniels21-Aug-13 21:26
mentorThomas Daniels21-Aug-13 21:26 
GeneralRe: .Net Certification Pin
Chandra Sekhar.bs22-Aug-13 19:22
professionalChandra Sekhar.bs22-Aug-13 19:22 
AnswerRe: .Net Certification Pin
Thomas Daniels22-Aug-13 21:02
mentorThomas Daniels22-Aug-13 21:02 
Questionhi Pin
Member 1022459421-Aug-13 20:53
Member 1022459421-Aug-13 20:53 
Questionsent email vb.net Pin
chew9321-Aug-13 7:59
chew9321-Aug-13 7:59 
QuestionRe: sent email vb.net Pin
jkirkerx21-Aug-13 10:54
professionaljkirkerx21-Aug-13 10:54 
AnswerRe: sent email vb.net Pin
chew9321-Aug-13 17:59
chew9321-Aug-13 17:59 
AnswerRe: sent email vb.net Pin
jkirkerx22-Aug-13 10:25
professionaljkirkerx22-Aug-13 10:25 

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.