|
Thanks again.
I think I am beginning to see what you mean - it will take some time for me to digest all your kind points. Yes, I can make those changes and see the results.
Do you mean apply CSS to ValidationSummary1, and not RegularExpressionValidator2, in order to add style to 'Please complete the Email field'?
|
|
|
|
|
You need to add style to both - the style on the ValidationSummary will apply to the summary messages at the top of the form, and the style on the individual validators will apply to the "*" that appears next to an invalid field.
I generally use a theme[^] folder with a .skin file to apply the same CssClass to all validators, and a CssClass to the ValidationSummary . That way, the settings are consistent across the site, and the style settings remain in the CSS file where they belong.
If you don't want to add a theme to your site, you'll need to set the CssClass on each validator and ValidationSummary wherever you use them.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yes, there is a theme to the site: www.dimadayoub.net[^], so the style would need to be consistent.
Because space there is limited - the form is small - I was thinking of displaying the error messages in the form fields themselves.
My CSS is not that good to do that - not sure it can be done in HTML/CSS alone.
Grateful for your time.
|
|
|
|
|
hi Friends,
I want to create dynamic CSS for multiple ASP.NET controls , I have created required css but not able to create the css file where I want to store this css.
For eaxample:
I want to host multiple site with different css /template but same code. so I want to design separate css file based on site Id. so the need is that when a user set their css for all controls then we will save it in a separate css file.
Please tell me the way how can i do this.
|
|
|
|
|
Its very simple.
You can create a text file from your web page with your css code and save it as .css extension. (If unable yo create text file then please follow the link http://aspalliance.com/152_How_to_Create_a_text_file_in_ASP_NET_[^]
Basic process for set a css file
<head>
<link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" />
</head>
But you need to set it from Code Behind
Then in your Page_Load , simply add a "href" attribute as below:
protected void Page_Init(object sender, EventArgs e)
{
var link = new HtmlLink();
link.Href = "~/styles/main.css";
link.Attributes.Add("rel", "stylesheet");
link.Attributes.Add("type", "text/css");
Page.Header.Controls.Add(link);
}
Hopefully its help you
|
|
|
|
|
What's the difference between 'model' and 'Model' in Asp.net MVC
|
|
|
|
|
Model represents the object (instance of the class) in your model .
For example, if your model is created as,
namespace Sample.Models {
public class Program {
public string Name { get; set; }
}
}
@model Program
<p>Model.Name</p>
This would write the value of Name in the paragraph.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
"model" is only used in the page directive at the top of the view to dictate which class the view uses for its model
@model MyClass
In the view itself Model represents the model that was passed to the view by the controller;
return View("MyView.cshtml", instanceOfMyClass)
So in the MyView.cshtml view code Model will represent instanceOfMyClass
|
|
|
|
|
Hi Everyone,
The company I work for has outsourced its website to a 3rd party, however we can write a custom error page to track 500 errors.
We would like to be able to create such a 500 error page to find out as much as much as we possibly can about what happened to cause the 500 error.
Also, we would like to get all the session and cookie data we can from the session that encountered the 500 error.
Then, we'd like to save all of that data into a DB table.
Have any of you done this sort of thing before, or have any recommendations?
All the Best to You!
Anne
|
|
|
|
|
Session timeout in ASP.NET?
Are you using Forms authentication?
Forms authentication uses it own value for timeout (30 min. by default). A forms authentication timeout will send the user to the login page with the session still active. This may look like the behavior your app gives when session times out making it easy to confuse one with the other.
<system.web>
<authentication mode="Forms">
<forms timeout="50"/>
</authentication>
<sessionState timeout="60" />
</system.web>
Setting the forms timeout to something less than the session timeout can give the user a window in which to log back in without losing any session data.
thanks
sign
Lowongan Kerja
modified 23-Oct-15 21:22pm.
|
|
|
|
|
Thanks, that is good to know.
A third party wrote the code, so I am not sure.
Anne
|
|
|
|
|
|
Thanks Daniel!
I'll take a look at those resources.
Anne
|
|
|
|
|
when i am accessing my application in lan ...then its working fine provided that firewall is off..which is not recommended..in this way when i turned on the firewall my application is not running...even after setting an inbound rules to the specific port m not able to access my application...how to fix this issue ..please help me out
Thanks
|
|
|
|
|
Did you enable "World Wide Web Services (HTTP Traffic-In)" and "World Wide Web Services (HTTPS Traffic-In)" inbound rules?
|
|
|
|
|
using Visual Studio 2015 community , VB
existing project has page that includes a timer and updatepanel
I am trying to add ajax combobox
project builds without error
however, running priject return the following error
Unhandled exception at line 429, column 5 in http://localhost:59875/Courier/CustDefault
0x800a138f - JavaScript runtime error: Unable to get property 'UI' of undefined or null reference
error occurs here
Sys.Application.add_init(function() {
$create(Sys.Extended.UI.ComboBox, {"autoCompleteMode" ,"buttonControl":$get("MainContent_ComboBox1_ComboBox1_Button"),"comboTableControl":$get("MainContent_ComboBox1_ComboBox1_Table"),"dropDownStyle":1,"hiddenFieldControl":$get("MainContent_ComboBox1_ComboBox1_HiddenField"),"optionListControl":$get("MainContent_ComboBox1_ComboBox1_OptionList"),"selectedIndex":-1,"textBoxControl":$get("MainContent_ComboBox1_ComboBox1_TextBox")}, null, null, $get("MainContent_ComboBox1"));
});
I have followed all suggestions that I could find revelent on the web with no success, Any Ajax control will return error remove control and project runs without error
Iknow i,ve done something stupid but can't figure out what
Suggestions appreciated
Ray
|
|
|
|
|
Replace asp:ScriptManager with ajaxToolkit:ToolkitScriptManager
|
|
|
|
|
Looking at the error message, you might have a reference (a mention of) to System.Web.Extensions.dll in your web.config.
Try and remove that line from web.config.
If the machine does not have the 2.0 version of the System.Web.Extensions.dll that could be your issue. You may need to re-download/install the .NET 2.0 version of the Ajax extensions from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
thanks
sign
Lowongan Kerja S1
modified 23-Oct-15 22:58pm.
|
|
|
|
|
Hi everybody,
I have problem with view menu in ASP.NET MVC:
My Model:
Category {Id, Name},
Subpplier {Id, Name},
Product {Id, Name, CategoryId, SupplyId, ...}
So I want to show my menu to 2 levels:
Level 1: Show Category list
Level 2: Show Supplier list in each Category from Products.
But i just can show Level 1 by Model = db.Categories. I can't show level 2 and how to get Supplier list from controller to view?
Please help me!
Thanks!
|
|
|
|
|
in your category model do you have navigation property to get list of suppliers?
If yes then For Level 2- you can do same thing which you did for level 1
Thanks
|
|
|
|
|
so true in your category model do you have navigation property to get list of suppliers?
If yes then For Level 2- you can do same thing which you did for level 1, and then deploy for your code in mvc and database,
or module in css menu for multiple menu,
thanks
sign
Lowongan Kerja
modified 23-Oct-15 21:22pm.
|
|
|
|
|
I want to check whether entered email id (eg. xyz@ymail.com, abc@rediffmail.com etc) is already exists or not. I dont want to use any third party payable tool or dll in software. Please help me out.
|
|
|
|
|
Which language you want to code it?
|
|
|
|
|
|