我想在登录后更改重定向网址 [英] I want to change the redirect url after Login

查看:84
本文介绍了我想在登录后更改重定向网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我使用的是Asp.net我需要帮助我在asp.net中使用默认登录模板我想要的成功登录用户可以重定向到Dashboard.aspx。现在它重定向到manage.aspx

Hi


I am using Asp.net I need help I am using Default Login Template in asp.net I want after Successfully Login User can redirect to Dashboard.aspx . right now its redirecting to manage.aspx

推荐答案

你好malhotra请你清楚解释或在这里发布这些行???
Hi malhotra will you please explain clearly or post those Lines here???


尝试一次



SqlCommand cmd = new SqlCommand(select password(*)from password where username ='+ txtUname.Text +'and password ='+ txtPwd.Text +',con);

//检查由ExecuteNonQuery影响的行数()

int index = Convert.ToInt32( cmd.ExecuteScalar());

if(index> 0)

{

Response.Redirect(dashboard.aspx); < br $>
}

其他

{

Response.Write(无效详情);

}
Try it once

SqlCommand cmd = new SqlCommand("select count (*) from password where username='"+txtUname.Text+"' and password='"+txtPwd.Text+"'",con);
//checking the number of row affecting by ExecuteNonQuery()
int index = Convert.ToInt32(cmd.ExecuteScalar());
if (index > 0)
{
Response.Redirect("dashboard.aspx");
}
else
{
Response.Write("invalid details");
}


这篇关于我想在登录后更改重定向网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆