如何在Web.Config文件中定义默认URL [英] how to define Default URL in Web.Config file

查看:223
本文介绍了如何在Web.Config文件中定义默认URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,

如何在asp.net项目的Web.Config文件中定义默认URL.

我的登录URL在Project1文件夹中,名为login.aspx和
我的默认URL在Project2文件夹中,为home.aspx,

基于此文件,如何定义正确的路径登录URL和默认URL

页面URL复制和
之一 当我使用其他浏览器时,
自动转到Home.aspx页面

回复我正确的路径

通过mohan

Dear sir,

How to define Default URL in Web.Config file in asp.net project.

My Login URL is inside Project1 folder as login.aspx and
My Default URL is Inside Project2 Folder as home.aspx,

Based on this file how to define Correct path login url and default url

One of the page URL copying and
when I use different browser,
automatically goes to Home.aspx page

reply me Correct path

By mohan

推荐答案

u如果用户未登录,则可以在Home.aspx中检查用户,因此可以将其重定向到login.aspx
u can check user in Home.aspx if the user is not logged in so redirect it to login.aspx
Response.Redirect("~/project2 or whatever/login.aspx", true);


这篇关于如何在Web.Config文件中定义默认URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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