Why Doesn't CSS Class Rule Get Used

Jan 28, 2012

I'm just trying to teach myself a bit of CSS and it's pretty straight forward but I am getting something odd.

I built a css file, tried out various rules, all good.

Now I edit the css file. Everything compiles ok but it's still using the rules as they were before I edited them. I've even removed some of them from the css file and they're still being used. I tried removing the reference to the css file and the rules all stop being used (as I'd expect) but when I add the reference back in and the old rules reappear but not the new ones.

I'm guessing there's some 'built' version of the css file and that's what's actually being used. But rebuilding the website isn't causing the built css to refresh itself so my edits aren't being picked up.

edit> forget it, I was hitting f5 not ctrl f5. Just a bit of cuture shock switching from desktop dev.

View 1 Replies


Similar Messages:

Adjustment Rule To Use From TimeZoneInfo Class?

Jan 25, 2011

Trying to extract the timezone data from all the time zones using the timezoneinfo class but I have run into a problem. For those timezones that have Daylight savings times I am seeing all kinds of different numbers of adjustmentrules and I have no idea how to determien which rule I shoudl be using for a given timezone. Some have 1 rule, but I see timezones with multiple rules some as high as 11 rules. How do I know which rule I chould be usuing to get the correct DaylightTransitionSart and stop values?

View 2 Replies

MVC Partial Class For Rule Validation

Jan 4, 2011

I have 2 projects. A data project, which contains my database and my Entity Framework model. I have table called 'User', and then have a generated EF class for user. I am trying to add a partial class:

using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Text;
namespace Data
{
public partial class user
{
public bool isValid
{
get {
return (GetRuleViolations().Count()==0);
}
}
public IEnumerable<RuleViolation> GetRuleViolations()
{
yield break;
}
partialvoid OnValidate(ChangeAction action)
{
if (isValid)
throw new ApplicationException("Rule violation prevents saving");
}
}
public class RuleViolation
{
public string ErrorMessage { get; private set; }
public string PropertyName { get; private set; }
public RuleViolation (string errorMessage)
{
ErrorMessage = errorMessage;
}
public RuleViolation(string errorMessage, string propertyName)
{
ErrorMessage = errorMessage;
PropertyName = propertyName;
}
}
}

This is following the MVC 1.0 NerdDinner example. However, I am getting a design time error on the OnValidate method:

partial void OnValidate(ChangeAction action)
{
if (isValid)
throw new ApplicationException("Rule violation prevents saving");
}

No definining declaration found for implimenting declaration of partial method 'void OnValidate(ChangeAction action)' What am I doing wrong?

View 1 Replies

MVC :: How To Permanently Redirect Url From Old Routing Rule To New Routing Rule

Nov 30, 2010

Response.RedirectPermanent(Url); can redirect permanently to a url.

However, during my SEO process, I decided to change my routhing rule.

For example,

I change "/tag/{tag}-quotes" routing rule to "quoes-about/{tag}", but I don't want to lose all the traffic to old routing url.

What is the best way to handle this permanent redirection?

View 4 Replies

Web Forms :: 1.1 - Simple Class Doesn't Work

Mar 19, 2011

Why the following code (asp.net 1.1) does not work?

//call.aspx
<script runat="server">
namespace DOTNETMath {
void Page_Load( Object s, EventArgs e )
{
ConstClass.DisplayEmployee("Testing");
}
}
</script>
//commonFunction.cs
namespace DOTNETMath {
Public Class ConstClass {
Public Shared Function DisplayEmployee(String x) {
Return x + " Hello ";
}
}
}

View 14 Replies

Web Forms :: Menu's StaticSelectedStyle Doesn't Work With CSS Class

Dec 29, 2010

I have a menu (linked to a sitemap) wrapped in to a panel surrounded by a round control extender. The menu has StaticMenuItemStyle, StaticHoverStyle and StaticSelectedStyle. The first 2 works like a charm but not the StaticSelectedStyle. On click of the menu item the screen is redirected to appropriate page, but the menu item cssclass is set back to StaticMenuItemStyle. The background of the menu items are images. I tried some of the solutions from other posts, but no use.

View 8 Replies

Web Forms :: MasterPage Call To Class Doesn't Work

Dec 8, 2010

I am porting my simple Role Based Auth to ASP.NET. It requires this check on each page:

[Code]....

If put in each page's OnLoad, it works fine. But when I add it to the masterpage, it doesn't work. Is there something about the ServerVariables or Session Object that would prevent using those in a masterpage? Is it an issue calling my class from a materpage?

View 1 Replies

C# - MembershipUser Class - Comments Method Doesn't Work?

Nov 16, 2010

I'm unable to set Comments property of a MembershipUser type objects.

E.g.

MembershipUser mu = Membership.GetUser(username);
mu.Comment = "someComments";

I'd expect this to set the Comment property of mu object to "someComments" and write changes to the database.

Later, I do a following check:
mu.Comment == "someComments";

Comment property is set to null. Is there anythign that I need to change in a web.config or...?

View 2 Replies

Visual Studio Doesn't Recognize Dynamic User Control Class

Jul 15, 2010

I have created a user control which is inside a folder called Controls and the class is a partial class which inherits from Web.UI.UserControl. Now from my page which is one level up I just try to access the method inside the usercontrol and so trying to cast it as the type of user control. But I get build errors. It just cannot recognize that class. I get Type not defined error. But at times it has recognized the class. Dont know why it does that.

View 1 Replies

Web Forms :: Reference Class From Inline Code - Error "The Name CsUserProperties Doesn't Exist In Current Context

May 1, 2010

I lifted some nice code to handle memberships, but I want to add a customer specific field. My issue is how to reference my class from the inline c# code.

[Code]....

The problem is the line csUserProperties.AddNew(intUserId, lngCustomerId); -- I get the error "The name 'csUserProperties' does not exist in the current context. I have <%@ Import Namespace="csUserProperties" %> at the top of the file. I also tried everything with no namespace in the class below.

View 3 Replies

Web Forms :: How To Draw Vertical Rule In C#

May 23, 2010

i have images in left ,right,bottom of the page so i want to draw border like this , in vertical and horizontal,can you give example:

[code]....

View 1 Replies

Url Rewriting With Intelligencia Rule Not Working

Mar 17, 2011

Im using Intelligencia UrlRewriter for url rewriting. I have wrote a set of rules in the web.config file I have two sets pages, Static pages whose name is static but content is CMS based Dynamic pages (actually this is not simply a dynamic page its a category which have description and sub categories) Here both pages are being rewritten from the config file. For instance home page, about us page etc tis is being rewritten as

rewrite url="~/Home" to="~/Default.aspx"

The category page is being the same kind of url its being rewritten as

rewrite url="~/(.*)" to="~/GroupHome.aspx?Group=$1"

I have given the rules for the static pages first and then the category url but all the urls are being rewritten to grouphome, even if I have given the rule for home page, about us page etc before the category rule. I have tried even the ollowing still its directing to Group home,

<rewrite url="~/Home" to="~/Default.aspx"/>
<rewrite url="~/(.*)/" to="~/GroupHome.aspx?Group=$1"/>
<rewrite url="~/Home" to="~/Default.aspx"/>

How the rule can be rewritten to include both urls

View 1 Replies

Password Rule For Casual Website

Jan 19, 2010

I am considering using the following rules for a casual website. 8-20 chars long valid chars include letters, digits, and symbols case sensitive that's all. My question is, beside white space, is there other symbol that I should consider as "illegal"? Please keep in mind that it is a casual website so I don't need any password policy that is very restricted.

View 8 Replies

Umbraco Rewrite Rule For Non Www Domains

Oct 4, 2010

I'm trying to redirect any non-www prefixed traffic to the www prefixed domain. I'm using Umbraco as the CMS and have added the following code into the urlrewritingnet config file:

<add name="nonWWW"
virtualUrl="^(?!www.)(.*)$"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="[URL]"
ignoreCase="true" />

I'm getting a "is not a valid virtual path" error

View 1 Replies

Design Pattern - Rule Checker

Apr 4, 2011

I sell products throgh my website. Recently we've been given a list of rules that need to be checked against each order, to make sure it's not fraudulent. So this list of rules/fraud indicators will change and grow so I want to make sure it's easily maintainable and really solid. I'm thinking I have an abstract class rule that each of the rules implements.

abstract class Rule
{
public string Message;
public bool Success;
public void CheckOrder(OrderItem currentOrder);
}
class FakeCreditCardNumberRule : Rule
{
public string Message = "Fake CC Number Rule";
public void CheckOrder(OrderItem currentOrder)
{
currentOrder.CreditCardNumber = "1234-5678-9012-3456";
Success = false;
}
}
class ReallyLargeOrderRule : Rule
{
public string Message = "Really Large Order Rule";
public void CheckOrder(OrderItem currentOrder)
{
currentOrder.ItemsOrder.Count > 100;
Success = false;
}
}

Then I'm thinking of having a class that accepts an Order object in it's costructor and checks though the list of rules. Something like:

class FraudChecker
{
List<Rule> rules;
public FraudChecker(OrderItem currentOrder)
{
foreach(var rule in rules)
{
rule.CheckOrder(currentOrder);
}
}
}

So I was trying to think of the best place/best way to populate the FraudChecker.Rules list and started thinking there might be some nice design pattern that does something like what I'm doing. Has anyone seen a design pattern I should use here? Or can anyone think of a good place to populate this list?

View 3 Replies

Web Forms :: Trying To Route / It Seems That Only The First Rule Is Applied?

Mar 8, 2011

I have a product-page and a department-page. Both departments and products are picked from a database by their id (productid and deptid).

When I try to route like this, it seems that only the first rule is applied, Why? How can I solve this?

In global.asax:

[Code]....

With the above settings I can reach
http://mysite.com/myproduct.aspx but not
http://mysite.com/mydepartment.aspx.

If I switch so that the DeptList rule comes first "mydepartment.aspx" works but not "myproduct.aspx"....

View 3 Replies

Solved URL Rewrite Rule Conflits In IIS?

Feb 24, 2011

I am getting problem in URL rewrite rules. I am used UrlRewritingNet.UrlRewriter Dll for Url rewriting in asp.net website.I used rules name as "Advanced"& Other rule name as DefaultRule that is used for any user profile page(ie. any user's profile page).When I entered username as "AdvancedMachinesTools". That Rules as below:-

<urlrewritingnet rewriteOnlyVirtualUrls="true" contextItemsPrefix="QueryString" defaultPage="Login" xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>

[code]...

View 2 Replies

Web Forms :: How To Prioritize URL Rewriting Rule

Oct 9, 2013

I want to use wild card after first slash("/")  in my url rewriting but i want other pages to redirect on particular page for e.g. if  i use this 

<rewrite url="~/(.+)" to="~/default.aspx" />

Then it will redirect all pages to to xyz.com/default.aspx   

But i want this will fire last if i use some rule before that if will fire to that page not use this url rewriting like in MVC but  i want it in through url rewriting e.g.

<rewrite url="~/submitform" to="~/submitform.aspx" />
<rewrite url="~/(.+)" to="~/default.aspx" />

in that case if user write xyz.com/submitform it will redirect to submitform.aspx  else redirect to default.aspx.

View 1 Replies

Validation Rule Belong To Multiple Groups?

Feb 18, 2010

Is it possible for an ASP.NET Validation Rule to belong to multiple groups? I'd like to validate the same control in different ways based on what mode the form is in using a single Validator. For the purposes of this question, the modes are Simple, which requires fewer fields, or Complex, which requires more fields. I know I can write CustomValidators (which I have done in the past), but I'd like a simpler solution.

So, I'd like to combine the following:

<asp:RequiredFieldValidator ValidationGroup="Simple" ControlToValidate="Name" />
<asp:RequiredFieldValidator ValidationGroup="Complex" ControlToValidate="Name" />

View 2 Replies

Web Forms :: URL Rewriting And Authorization Rule Conflict?

Oct 1, 2010

I am having some trouble when I use ASP .Net 4's URL Rewrite feature while Authorization rules configured.

Global.asax

[Code]....

{Root}Web.Config

[Code]....

{Root}RestrictedWeb.config

[Code]....

The problem I am facing is: When I try to visit [URL]- because of my dashboard rule in Global.asax, instead of being redirected to [URL] I am actually getting the content of [URL] when I try to visit [URL] I do get redirected to [URL] which is a good sign.

View 1 Replies

File Name Generation Rule For Pre Compiled Files

Jul 21, 2010

After pre-compiled a ASP.NET web site, I got many files with the names like

App_Web_accountbalance.aspx.dfa151d5.dll

Do you know the rule for the random chars (in bold) above? Can we fix the random chars? The reason to fix it is that if we modify AccountBalance.aspx file later and re-compile the web site, can we just replace App_Web_accountbalance.aspx.dfa151d5.dll.

View 1 Replies

Configuration :: Creating Access Rule Using Code?

Aug 3, 2010

How do i create access rule using code in web conf.

for example i have folder named secured and some rootdirectories under it e.g forum, account, members e.t.c so that anoynimous user shall be redirect to login page.

View 1 Replies

Rewrite Rule To Map Locations To Static Files

Jul 22, 2010

What I want to do it rewrite urls for a bunch of static pages in a locations folder such that

/london

maps to the physical file if it exist in the locations folder eg.

/locations/london.aspx

Is this possible with url rewrite. I can't get the rule to work.

<rule name="Rewrite Locations">
<match url="^([_0-9a-z-]+)/*" />
<conditions>
<add input="/locations/{REQUEST_FILENAME}.aspx" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="/locations/{R:1}.aspx" />
</rule>

View 1 Replies

Configuration :: Event Not Working Due To Canonical Rule?

Jul 14, 2010

I have create following rule on my local server to check canonical url

<rewrite>
<rules>
<rule name="Enforce canonical hostname" stopProcessing="true">
<match url="(.*)"/>

[Code]....

Its working but i have default.aspx page on which i have taken one link button and written event like this

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Write("Testing Canonical Issue")
End Sub

When i click that linkbutton nothing happens only page get refreshed.

Actually i dont want to display default.aspx page along with my website thats why i have written second rule.

I want domain name with no default.aspx page

if some body writes like this www.abc.com/default.aspx then it must be 301 redirect to www.abc.com

View 1 Replies

C# - Is It Possible To Turn Off The Canonical Hostname URL Rewrite Rule From The Codebehind

Sep 27, 2010

I was wondering it is possible to turn off the canonical hostname URL Rewrite rule from the URL Rewrite 2.0 IIS 7.5 Module.

I'm locally developing on a IIS 7.5. The setting of this URL Rewrite rule is set in the web.config.

This is how I deploy: I'm using Webdeploy to publish my web application. The new web.config transforms, which was introduced with VS 2010, is no option for me, because it is bugged:

[URL] and will not be fixed until the release of VS2010 SP1. I'm also not using web deployment projects anymore, because Webdeploy does not seem working with web deployment projects. As a result, I manually switch on the rewrite rule in the web.config before deploying.

If I now want to locally debug something, I manually need to turn off the rule.

Is there a solution like this pseudo-code?

if(Properties.Settings.TurnOffCanonicalHostNameWithLocalHost)
{
URLRewriteModule["CanonicalHostName"].Enabled = false;
}

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved