我的主题和图片正在消失 [英] My theme and pictures are disappearing

查看:55
本文介绍了我的主题和图片正在消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站和我,我使用的是一个由皮肤和层叠样式表组成的应用程序主题,我有很多主页,它工作正常。


我在我的站点中使用会话登录,因此我创建了一个全局文件(global.asax)。在这个全局文件中,我通过以下函数检查登录:


Sub CheckLoggedIn()

''如果用户没有登录,你就是当前不在登录页面上。

If(会话(" id")=""和会话(" pass")=""和InStr(Request.RawUrl,& ; Default.aspx")= 0)然后

Response.Redirect(" Default.aspx")


结束如果

结束子


如果我删除此功能,所有图片和主题都会正常显示

但是一旦我添加了这个功能,我网站上的所有图片'' s主题消失了!!


这个功能有什么问题?这不正确吗?


任何人都可以帮我丢失一些东西吗?请尽快帮助我,因为我必须在1周内提交此网站


注意:我正在使用本地主机服务器和mysql与asp.net和vb.net。

I have a website and I,m using a an application theme that consists of a skin and a cascading style sheet and I have vriety of master pages and it works fine.

I use in my site a log in with session so I create a global file ( global.asax ). Inside this global file I check for log in by the following function:

Sub CheckLoggedIn()
''If the user is not logged in and you are not currently on the Login Page.
If (Session("id") = "" And Session("pass") = "" And InStr(Request.RawUrl, "Default.aspx") = 0) Then
Response.Redirect("Default.aspx")

End If
End Sub

If I remove this function all pictures and the theme are displayed normally
but once I add this function all the pictures in my site''s theme disapeared!!

what is wrong with this function? Is it not correct??

can any one help am l missing something? please try to help me as soon as you can because I have to submit this site in 1 week

NOTE: I''m using the local host server and mysql with asp.net and vb.net.

推荐答案

当你说删除此功能时你的意思是评论功能的主体正确吗?


可能发生的事情是该功能或您的登录不能按预期工作,并且您总是被重定向到Default.aspx。

在旁注中,此功能仅在您处于Default.aspx的情况下才会重定向,并且您没有登录凭据。


When you say "remove this function" you mean "comment the body of the function out" correct?

What may be happening is that the function or your login are not working as you expect, and you are always getting redirected to Default.aspx.

On a side note, this function will only redirect in the case that you ARE on Default.aspx, and you have NO login credentials.



我有一个网站,我使用一个由皮肤和级联样式表组成的应用程序主题,我有各种各样的母版页,它工作正常。


我在我的网站上使用会话登录,所以我创建了一个全局文件(global.asax)。在这个全局文件中,我通过以下函数检查登录:


Sub CheckLoggedIn()

''如果用户没有登录,你就是当前不在登录页面上。

If(会话(" id")=""和会话(" pass")=""和InStr(Request.RawUrl,& ; Default.aspx")= 0)然后

Response.Redirect(" Default.aspx")


结束如果

结束子


如果我删除此功能,所有图片和主题都会正常显示

但是一旦我添加了这个功能,我网站上的所有图片'' s主题消失了!!


这个功能有什么问题?这不正确吗?


任何人都可以帮我丢失一些东西吗?请尽快帮助我,因为我必须在1周内提交此网站


注意:我正在使用本地主机服务器和mysql与asp.net和vb.net。
I have a website and I,m using a an application theme that consists of a skin and a cascading style sheet and I have vriety of master pages and it works fine.

I use in my site a log in with session so I create a global file ( global.asax ). Inside this global file I check for log in by the following function:

Sub CheckLoggedIn()
''If the user is not logged in and you are not currently on the Login Page.
If (Session("id") = "" And Session("pass") = "" And InStr(Request.RawUrl, "Default.aspx") = 0) Then
Response.Redirect("Default.aspx")

End If
End Sub

If I remove this function all pictures and the theme are displayed normally
but once I add this function all the pictures in my site''s theme disapeared!!

what is wrong with this function? Is it not correct??

can any one help am l missing something? please try to help me as soon as you can because I have to submit this site in 1 week

NOTE: I''m using the local host server and mysql with asp.net and vb.net.


是的,当我通知函数的主体时,每件事情都很好.........

但是一旦我回到身体,主题消失了....


这个问题的原因是什么?


当我尝试使用

(Response.RedirectLocation =" http:// localhost:4718 / AlertPalSiteDesign")


而不是使用


回复。重定向(" Default.aspx");


主题和我的所有图片都正常显示,但IF语句

(如果(会话(" id") ;)="" And Session(" pass")="" And InStr(Request.RawUrl," Default.aspx")= 0))

在我的函数中没有工作.......................

我不明白我的问题在哪里,我怎么能修理它吗?
Yes when I commint the body of the function every thing works fine.........
but once I return the body the theme disappear....

what is the reason of this problem ?

When I try to use
( Response.RedirectLocation = "http://localhost:4718/AlertPalSiteDesign" )

instead of using

Response . Redirect("Default.aspx");

The theme and all my pictures appear normally but the IF statement
(If (Session("id") = "" And Session("pass") = "" And InStr(Request.RawUrl, "Default.aspx") = 0))
in my function doesnot work.......................

I don''t understand where is my problem and How could I repair it?


是的,当我通知功能的主体时,每件事情都很好.........

但是一旦我回到了身体主题消失....



当我尝试使用

时(Response.RedirectLocation =" http:/ / localhost:4718 / AlertPalSiteDesign")


而不是使用


响应。重定向(" Default.aspx");


主题和我的所有图片都正常显示,但IF语句

(如果(会话(" id") ;)="" And Session(" pass")="" And InStr(Request.RawUrl," Default.aspx")= 0))

在我的函数中不工作(即使用户没有登录,所有页面都会打开).......................

注意:

我将styleSheet应用于我的网站,如下所示:


1.在web.config文件中:

< pages styleSheetTheme =" Granite">


2.在我网站的每个母版页内,我添加以下声明

< link href = QUOT; App_Themes文件/花岗岩/ Granite.css"的rel ="样式表"类型= QUOT;文本/ CSS" />


3.最后,在网站的每个aspx页面中,我按以下方式添加母版页


<% @ Page Language =" VB"的MasterPageFile = QUOT;〜/ AdminMasterPage.master" AutoEventWireup = QUOT假QUOT;的CodeFile = QUOT; ManageRecommendation.aspx.vb"继承= QUOT; ManageRecommendation" title ="管理建议书" %>


我的方式是应用主题正确吗?



是什么原因我的问题 ???它是应用主题还是来自函数CheckLoggedIn()?


如何修复此问题
Yes when I commint the body of the function every thing works fine.........
but once I return the body the theme disappear....



When I try to use
( Response.RedirectLocation = "http://localhost:4718/AlertPalSiteDesign" )

instead of using

Response . Redirect("Default.aspx");

The theme and all my pictures appear normally but the IF statement
(If (Session("id") = "" And Session("pass") = "" And InStr(Request.RawUrl, "Default.aspx") = 0))
in my function does not work (all pages are opened even though the user is not logged in).......................

Note:
I apply the styleSheet for my site as follows:

1. In the web.config file:
<pages styleSheetTheme ="Granite">

2. And inside each master page in my site I add the following statement
<link href="App_Themes/Granite/Granite.css" rel="stylesheet" type="text/css" />

3. Finally,inside each aspx page in the site I add the master page in the following way

<%@ Page Language="VB" MasterPageFile="~/AdminMasterPage.master" AutoEventWireup="false" CodeFile="ManageRecommendation.aspx.vb" Inherits="ManageRecommendation" title="Manage Recommendations" %>

Is my way in applying the theme correct??



What is the reason of my problem ??? Is it from applying the theme or from the function CheckLoggedIn()?

How could I repair this problem


这篇关于我的主题和图片正在消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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