CSS Style for ModelState.AddFormError("Unable to login") - webmatrix

i want to style my error message which is "unable to login" but i dont know how to tag it in css? thanks in advance.
im using webmatrix 2.

I wish you have a code to show. but i will imagine you mearnt injecting css to a failed login.
if(!Validation.IsValid()){
<style type="text/css">
/*Style the error class here */
</style>
}

Related

Svelte Materialify library doesn't load theme styles

I am using the latest Svelte Kit as well as the Svelte Materialify library for fast UI development. The library documentation described the theme development method:
You want to customise some SCSS variables? Worry not, just put them in the _material-theme.scss you had created:
$primary-color: #004d26;
...
But this method didn't work. Even after I specified the folder in the Svelte Kit configuration and also installed all the dependencies:
preprocess: preprocess({
scss: {
includePaths: [resolve('./theme')] // resolve imported from path
},
postcss: {
plugins: [postAutoprefixer]
}
}),
You could try adding a style tag with a "global" and lang="scss" attribute in your __layout.svelte and then import the variables file there.
<style global lang="scss">
#import '../styles/variables';
#import '../styles/main';
.date-picker {
outline-color: $input-outline-color;
}
</style>
This has worked for me to make my custom variables accessible in main.scss and this tag in __layout.scss. If you need those variables in any other component down the tree, you need to reimport those variables, IMO. This should not be a problem in regard of duplication of styles as long as you do not add any style rules to the variable file.
Update:
While the approach above might work, it is not the recommended solution. An error message by the compiler guided me to the right solution further explained here:
svelte documentation
Directly import the main.scss stylesheet into your "main.js" file maybe also the __layout file in SvelteKit
<script lang="ts">
import '../app.css';
import '../styles/main.scss';
</script>
<slot />
<style global lang="scss">
</style>

Master page throws error when code is inserted

I have a master page that throws an error on content pages when the following line of code is inserted into the master page. It will not let me enter design mode.
<script src='<%= CacheHelper.Fingerprint("/assets/scripts/app.min.js") %>' />
However, the following line of code doesn't throw an error. I've tweaked the quotes, added a type etc, but it still refuses to play ball.
<link rel="stylesheet" href='<%= CacheHelper.Fingerprint("/assets/styles/app.min.css") %>' />
I'm using VS2010.
After trawling, trying and testing for a few hours I can categorically say that 99% of the answers to similar questions do not work.
The answer I found that did work was to replace the end tag '/> with '></script>' - after this Visual Studio started behaving.

google api developer console login error

Whenever I go to http://code.google.com/apis/console , it redicts me to a almost blank page with nothing but text "30" on the page.
After view source I see
<html><head><title>404 (Not Found)</title><style type="text/css">
body {
white-space: pre;
font-family: Monaco, "Liberation Mono", Courier, monospace;
font-size: .75em;
}
</style></head><body>30</body></html>
It happens over and over and after I delete cookies it still happens shortly after I login again.
Any ideas?
Thanks.
Probably the site is trying to redirect you to an old project that you deleted and no longer exists.
check the URL it should be something like
this = console.developers.google.com/project/{ProjectNumber}/?auth... etc.
delete the [project/{ProjectNumber}/] part you should have
something like
this = console.developers.google.com/?auth... etc.
I don't know why this happens but that did it for me hope it helps

how to console.log using the cordova.js file in phonegap

I keep reading that the console.log needs to come after the onDeviceReady function, but I don't see any onDeviceReady functions in the cordova.js. Do I need to write my own? Does anybody know what the function would look like? What if I just wanted to console log "hello"?
Also, I noticed that cordova.js is not included as a script in the index.html. I'm assuming it needs to be if I want to see anything logged in the xcode console?
If you create the phonegap project by command line interface as described in their site
You should include cordova-3.x.x.js in your html head.
<head>
<script type="text/javascript" src="cordova-3.x.x.js"></script>
<script>
function onLoad() {
document.addEventListener(
'deviceready', onDeviceReady, false);
}
function onDeviceReady() {
// do Something!
// example: display a Cordova Console
// see docs.phonegap.com for full details
console.log("HELLO...");
}
</script>
</head>
<body onload="onLoad();">
Inorder to use the debug console in phonegap, you should add the plugin to the project by CLI
Type this command in Terminal
$ cordova plugin add org.apache.cordova.console

PhoneGap & Visual Studio not copying script file

I set up a brand new project using the PhoneGap starter template in Visual Studio. The template works as expected, but if I try to add jquery mobile to the page, and call a function from it, its reported that jQuery is undefined.
here is my template javascript:
<script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script>
<script type="text/javascript" src="jquery.mobile.min.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready",onDeviceReady,false);
// once the device ready event fires, you can safely do your thing! -jm
function onDeviceReady()
{
document.getElementById("welcomeMsg").innerHTML += "Cordova is ready! version=" + window.device.cordova;
console.log("onDeviceReady. You should see this message in Visual Studio's output window.");
jQuery("#welcomeMsg").html("blah");
}
</script>
My CordovaSourceDictionary.xml looks like it is ok too:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is auto-generated, do not edit! -jm -->
<CordovaSourceDictionary>
<FilePath Value="www\cordova-1.5.0.js"/>
<FilePath Value="www\index.html"/>
<FilePath Value="www\jquery.mobile.min.js"/>
<FilePath Value="www\master.css"/>
</CordovaSourceDictionary>
but upon trying to debug the WP7 app, i get these errors:
ScriptNotify :: Error:"'jQuery' is undefined"
Log:"Error in success callback: Connection1 = 'jQuery' is undefined"
In the code you posted, you aren't including the jQuery core... jQuery Mobile is built on-top-of jQuery Core so the core must be included before jQuery Mobile or jQuery Mobile will not function.
Notice on the jQuery Mobile download page the order of includes (mobile.css, then core JS, then mobile JS):
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
Source: http://jquerymobile.com/download/

Resources