|
|
Hello,
I have the following code in my Site.css file
.field-validation-error
{
color: #ff0000;
}
.field-validation-valid
{
display: none;
}
.input-validation-error
{
border: 1px solid #ff0000;
background-color: #ffeeee;
}
.validation-summary-errors
{
font-weight: bold;
color: #ff0000;
}
.validation-summary-valid
{
display: none;
}
BODY { font-family: Cambria, Georgia, "Times New Roman"; margin: 0; }
DIV#header DIV.title, DIV.item H3, DIV.item H4, DIV.pager A {
font: bold 1em "Arial Narrow", "Franklin Gothic Medium", Arial;
}
DIV#header { background-color: #444; border-bottom: 2px solid #111; color: White; }
DIV#header DIV.title { font-size: 2em; padding: .6em; }
DIV#content { border-left: 2px solid gray; margin-left: 9em; padding: 1em; }
DIV#categories { float: left; width: 8em; padding: .3em; }
DIV.item { border-top: 1px dotted gray; padding-top: .7em; margin-bottom: .7em; }
DIV.item:first-child { border-top:none; padding-top: 0; }
DIV.item H3 { font-size: 1.3em; margin: 0 0 .25em 0; }
DIV.item H4 { font-size: 1.1em; margin:.4em 0 0 0; }
DIV.pager { text-align:right; border-top: 2px solid silver;
padding: .5em 0 0 0; margin-top: 1em; }
DIV.pager A { font-size: 1.1em; color: #666; text-decoration: none;
padding: 0 .4em 0 .4em; }
DIV.pager A:hover { background-color: Silver; }
DIV.pager A.selected { background-color: #353535; color: White; }
then I try to load it in Site.master file:
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<link rel="Stylesheet" href="~/Content/Site.css" />
</head>
<body>
<form id="form1" runat="server">
<div id = "header">
<div class = "Tittle" align="center" >SportsStore</div>
</div>
<div id = "Categories" >
Will put something here.
</div>
<div id="Content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
the problem is after I run the program, nothing applied.
could you please tell me what is the problem.
|
|
|
|
|
I think the href is wrong (you can't use ~ as the control know nothing about it). With the master file open drag the style sheet onto the page and it will create the link for you with the correct href. Path should be like ../Contet/Site.css or Content/Site.css depedning how you have nested the folders.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
be sure your CSS is in content folder...
and second thing..
u have given a class
<div class = "Tittle" align="center" >SportsStore</div>
but there is no Tittle class in your css
check it again...
Rating always..... WELCOME
Be a good listener...Because Opprtunity Knock softly...
Use http://www.google.com/transliterate/ for translator
|
|
|
|
|
Hello All,
I liked Codeproject control which is used for code and discussion forum.
Greetings to Code Project Devlopers.
But, Can any body tell me how make this kind of nested control. can any body provide me startup or Get start knowledge on this.
I want to make this kind of control to sharpen skill.
Thanks,
Hiren Solanki,
|
|
|
|
|
Which control are you talking about?
Is it the menu on the top which says Home, Articles, Question & Answers...
If yes, it a ASP.NET Menu Control[^]
If No, please clarify.
..Go Green..
|
|
|
|
|
i am talking about the gridcontrol in which we are placing questions and answers.
Thanx
|
|
|
|
|
Oh, okay.
You already got the answer by Scott.
..Go Green..
|
|
|
|
|
|
Thanks scott.
Really appreciated your help.
Hiren Solanki
"Software Engineers don't have Trophy Wives; they have Presentation Layers"
|
|
|
|
|
I'm very new to Asp.net. Right now I'm working on a website (implementing registration particularly). Users need to provide their email address and an activation email must be sent to their email box.
On desktop in such situations(knowing that many users might simultaneously request registration) I would've created a thread that waits on a thread-safe queue to take an email address from that queue and send activation URL to taken address. This way UI thread would just need to put received email into queue and show a message that an email is being sent.
In Asp.net, Can I have a worker thread that runs as long as my application runs(maybe created in Application_Start) and a queue. How reliable is this solution in asp.net? What are alternatives.
Thanks.
"I hope you live a life you're proud of. If you find that you're not, I hope you have the strength to start all over again." - I wish I knew who is this quote from
|
|
|
|
|
Your best bet is to put the requests for a registration email into a database or other table and then have a non-ASP.NET service respond to those pending requests. (You could also use MSMQ instead of a db for this).
|
|
|
|
|
Thanks.
Nice solution but Windows service will need to query database server every now and then(polling) to see if any new email is inserted. Maybe inserting an item into database and a notification message in MSMQ lead to better performance.
Thanks anyway.
"I hope you live a life you're proud of. If you find that you're not, I hope you have the strength to start all over again." - I wish I knew who is this quote from
|
|
|
|
|
This approach works very well. I recommend it on grounds of reliability.
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
|
|
|
|
|
How many simultaneous registrations are you expecting? Unless you are expecting more than 100 per second, I don't think you need to worry about threading.
Or rather than worry about threading in your ASP.Net app, make a web service that handles sending the e-mail and make asynchronous calls to the web service from your ASP.Net site.
|
|
|
|
|
T M Gray wrote: more than 100 per second
Wow! That's too much. I expected much less. I don't think it ever happens! Being new to asp.net I hardly can estimate resource usages per user.
Well I'm far less concerned now. Thank you.
"I hope you live a life you're proud of. If you find that you're not, I hope you have the strength to start all over again." - I wish I knew who is this quote from
|
|
|
|
|
Create yourself a Windows Service that handles these "background" type requests, it makes life so much easier for debugging and troubleshooting.
My basic design is to use a directory where the service "listens" (FileSystemWatcher) for an XML file to be dropped. It then picks up the file and performs the necessary request. Once the request is complete, it moves the XML file to either an "Archive" or "Error" folder. I use the Event Log to track basic message status, but you can devise any type of logging system you want.
In my system, I know that there aren't going to be lots of requests, so this is a single threaded job, very simple, yet robust.
I'm all for keeping things simple and reliable.
|
|
|
|
|
We have had a lot of luck with this approach, and it has the salient benefit that the service can be administered simply from the administrative tools on the server, and restarted as needed. Further, it can have a very simple console monitoring capability that lets you see what it is up to in real time.
Also, the very same service can interact with any sort of application, not just a web submittal app...
|
|
|
|
|
Hi,
I believe that the answer is by using the singleton pattern. Just create a singleton class for the process queue (with the put method and a permanently alive thread or threads that block when the queue is empty and resumes execution when the queue receives a put) and use it in your ASP application.
|
|
|
|
|
si24803 wrote: using the singleton pattern
Honestly, I prefer to avoid any static thing as much as I can. Singleton in my opinion is just the same static functions + a constructor. The constructor adds benefits but using static functions in a multi-threaded world is tricky. Keeping track of all shared resources during application lifetime is hard indeed. Don’t get me wrong. I don’t say I totally avoid them but I will as much as I can.
si24803 wrote: a permanently alive thread or threads that block when the queue is empty
That was my first question. Answers were great. While that fits very well in desktop applications, I’ve learned that it's not the best possible solution in a web application.
I think best possible solution was given by T M Gray; first ensure if it’s really needed. If so, then have a separate Win/Web Service to do background probably time-intensive jobs. Use an IPC mechanism (WCF netpipes maybe) or RPC or SOAP messages, in case of a WebService, to inform the Win/Web Service asynchronously that a new email is to be processed.
"I hope you live a life you're proud of. If you find that you're not, I hope you have the strength to start all over again." - I wish I knew who is this quote from
modified on Monday, August 23, 2010 7:29 AM
|
|
|
|
|
I do have one i frame like on my .aspx page
<iframe height="500px" width="500px" src="http://www.codeproject.com" id="Iframe1" runat="server"></iframe>
but when i run this page.
the webpage inside page taking control of whole the form and just redirects to given src of Iframe.
Can anybody say reason behind this ?
|
|
|
|
|
You should delete the question in the other forum before posting here. In any case, you already have the answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
That is not answer of my question. so 0/5
|
|
|
|
|
|
Sorry, for that by mistake i put question there but i got very good response then core group.
Thats why i haven't deleted question.
Will Keep it mind and try to make chris maunder proud.
|
|
|
|