|
Hello,
I would like to put a panel at the top of my web page which spans the entire width of the page. Here is the code I have:
<asp:Panel id="Panel1" style="Z-INDEX: 102; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" Width="100%" Height="48px" Wrap="False">
</asp:Panel>
For some reason, when this is rendered in IE, it leaves a quarter inch of space on the right side near the vertical scroll bar. If I set the width=110%, it spans the entire screen, but then a horizontal scroll bar appears. Is there any particular reason this is happening? The same thing happens when I set other objects to have a width of 100% (ex. horizontal rule, table, etc). How do I get rid of this problem?
Thanks for your help,
RC
|
|
|
|
|
This is a stylesheet problem. You should set the padding to 0 and possibly the margin to 0. This has to do with the box format that CSS uses.
So, to your style attribute add padding:0px;margin:0px .
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Sounds like you've got the default padding on the page. Add html,body { padding: 0; margin: 0 } to your stylesheet and you should be good to go.
- Mike
|
|
|
|
|
One other thing that you might want to try is setting the rightmargin attribute of your body tag to "0".
HTH,
Bill P.
Oakland, CA
|
|
|
|
|
Hi all,
My Web server is IIS6 running on a windows 2000 server. I am trying open a document from an ASP Page. The problem I am facing is in clients other than windows 2000 the word file is not opening. Some clients if it opening with format mismatch error.
When I checked the Windows 2000 clients where I am getting the output, the file association for ASP is with Win Word. The other clients this entry is not there. ( My computer -> View -> Folder Options -> Files Association). Now if I manually put this entry still the format mismatch is coming.
How to solve this??
Thanks and Regards,
Satya Prasad
|
|
|
|
|
Are you sending the appropriate MIME type (HTTP's Content-Type header)? You should set the response's Content-Type to "application/msword".
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi,
Yeah I initially set the Content Type to "application/msword". It was opening word but without any output, so I changed that to "application/winword". Then I got the output in only Windows 2000 clients, other clients I could not get the output. Any suggestions??
Regards,
Sayta.
|
|
|
|
|
The version of Windows doesn't matter - only the version of IE and Office (IE is what associates MIME handlers while one of the Office products is being opened). So, are all the versions of IE the same? How about Office?
Have you also tried downloading the file via a simple user agent (using the PERL mod LWP, .NET BCL's System.Net.WebClient, or something else) to see what it contained? Perhaps there's an error generating the file that you're not seeing or the binary output is corrupted (possibly the Content-Length header isn't correct either, thus causing corruption).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi,
The client Windows2000 with Office 2000, alone is getting the page displayed. Why I mentioned OS is because with Win NT workstation Office 2000 installed on it, I could not get the page. Coming to IE in all the clients IE 5.0 or later.
I am putting my code snippet here.
<% Response.buffer= true
Response.ContentType = "application/msword" %>
<% dim conn,rs
set conn=Server.CreateObject("ADODB.Connection")
conn.open "dsn here"," "," " %>
' Putting a query here
set rs=conn.execute("Select xxxx")
' Writing the output to a html table in a loop
Thanks and Regards,
Satya Prasad
|
|
|
|
|
Wait, you're outputing HTML? The MIME type should be "text/html" then. While Word can open HTML docs, when you tell it the MIME type is "application/msword", it's no surprise that it's failing. If you want to open the document in Word, you could have a link that invokes a script (in the local or Intranet zone, this should work) that causes Word to open the document itself. Since it, too, can read "text/html" documents it will handle it appropriately. But telling Word that it's to read something in one format when it's really another is bound to lead to problems.
There's several articles here on CP that show you how to open a document in Word. Pass a URL instead of a file path and you should be okay:
<script language="jscript">
var word = new ActiveXObject("Word.Application");
word.Open(url); You'll want to double-check the code, though.
There are examples on the 'net (even here on CP) that do the same thing you're trying, but like I said - when you tell Word that it's opening a word document when it's really opening an HTML file, expect the unexpected.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
Tom Archer wrote:
How can I change the icon that appears in the IE address bar for my site? I know CP had such a thing a while back and it's gone now.
Put an icon named favicon.ico in your root directory.
Tom Archer wrote:
Also on a related note, if you drag the Google URL to the links band, the Google icon appears on the band. How is this done?
Same way.
|
|
|
|
|
In addition to what jdunlop said, you should also add a LINK tag in your HEAD for pages. This is actually the standard:
<head>
...
<link rel="shortcut icon" type="image/x-ico" href="/favicon.ico">
<head> You can also use ref="icon" and different types, like PNG, GIF, and JPEG of the appropriate sizes this way, and use images in different places (if you like to keep all images together, for instance).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hello,
I am looking into charting components for ASP.NET - There seem to be quite a lot of products out there - But I have a specific requirement so if anyone can help me out (and short circuit my search) I'd be really pleased.
Specifically the charting tool needs to be able to plot a scatter plot with a best fit curve. Both scatter plot and best fit curve must be displayed on the same plot. The function for the best fit curve must be custom defined. If the charting component cannot accept a custom best-fit curve function then the other option would be the ability to put two plots on one chart and a series of plot points can be provided to allow a reasonable approximation to be generated.
Any ideas would be greatly appreciated.
Regards,
Colin.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
Quoting GOTDOTNET.com:
http://samples.gotdotnet.com/quickstart/aspplus/doc/debugcomsdk.aspx
"Because many parts of an ASP.NET Framework application are dynamically compiled at runtime (.aspx and .asmx files, for example).."
What does aspx file compiled to? I thought "code behind" is compiled into "dll" and placed in the "bin" directory of the web app (virtual) directory when you first build the project.
Do they mean rendering "aspx" into "Html"?
|
|
|
|
|
Yes, code-behind files are compiled into DLLs, but ASP.NET files (like aspx) need not use code-behind. Any server-scripting in an aspx file (or ascx, asmx, or anything else similar) in the page itself must be compiled and is done so at runtime with the first access of the page / control after the application object is created. The compilation can be controlled via the <compilation> configuration section under <system.web> .
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
is done so at runtime with the first access of the page /
Thanks for feedback. But, what do you mean it's compiled at first hit? The "ASPX' file is "COMPLIED" into HTML?? I know XXX.aspx.cs is compiled into a dll. But not the "aspx" itself. That's the confusing part.
|
|
|
|
|
CillyMe wrote:
I know XXX.aspx.cs is compiled into a dll. But not the "aspx" itself. That's the confusing part.
What he means is that if you put code in the aspx page instead of in a code-behind file, that code will be extracted and compiled into a dll at the time it's first accessed.
|
|
|
|
|
|
Some design issues come to mind when building a new system and you do look for answers on the best sites... That said, I would appreciate the input you can give me on the following dilemma:
Codeproject has a discussion attached to every article. Moreover I noticed that it uses the same code all around the site, even in these Message Boards. So some questions comes to mind - does each article own a different forum? wouldn't that expand the database? How are the "Message Boards" differentiated from the rest of the articles - by hand or code?
I was thinking of an alternative. Maybe instead of opening unique forums for every article, only open a new Thread in a specific "article-discussions" forum. That way, each article gets a thread, but no new forums are created each time. Each Thread can have son messages, but the user doesn't know that this is the case...
Does anybody see this as problematic? Does anyone have another suggestion? Does codeproject follow correctly my assumptions?
I would appreciate any input one can offer.
Thanks in advance,
Allia.
I live to code...
|
|
|
|
|
allia wrote:
does each article own a different forum? wouldn't that expand the database?
What do you mean by "expand the database"? Something like this could be handled by simply having a table of forums and having each message know the forum it belongs to and what message it is in reply to (with all the appropriate indexes to keep things speedy).
- Mike
|
|
|
|
|
What I ment by "expand the database" is that for EACH article a new forum record is inserted into the "table of forums". This in time, enlarges the amount of data in the database.
I suggested a different approach that doesn't insert a new record, but uses an existing forum to open a new thread. Each thread is assigned to an article. I don't know what to make of this since if I take it to the extreme case, where nobody writes comments, then I am better off with the regular approach since the forums-table is smaller in field-size than the message-table field-size.
Does any body have a different take on this issue? Again, I direct you to my list of questions from which this discussion started.
Thanks in advance.
Allia.
I live to code.
|
|
|
|
|
Why not do away with the Forums table all together then and have the forum the thread is targeted at as a column of the thread record.
Well naturally the answer is simple and is why relational databases exist; What happens when your Forum wants more than one piece of data asssociated with it? e.g. Name and Description. With the above method both the Name and Description has to be recorded for each and every thread. Ouch.
But you said just for article forums. But then you would need different code to access and parse the data records. One set of code for article forums and another for "normal" forums.
That increases complexity and so introduces more points for bugs to creep in, makes maintenance harder and a host of other issues.
Also, and I may be wrong on this, but a select based on a foreign key integer value is faster than a select filtering through a string field.
regards,
Paul Watson
Bluegrass
South Africa
Anna-Jayne Metcalfe wrote:
"Cynicism has it's place in life - but it should be kept well away from your inner self."
Crikey! ain't life grand?
|
|
|
|
|
Paul Watson wrote:
But then you would need different code to access and parse the data records
Paul, why would I need a seperate code? couldn't I just use the same code of the view-thread ? just as though I would direct you to
http://www.codeproject.com/script/comments/forums.asp?forumid=1640&select=660732&df=100&tid=660732#xx660732xx
[modified: I think I understand why - It's because the New Thread option wouldn't add a thread in the appropriate place...]
Finally, I didn't understand your comment:
Why not do away with the Forums table all together then and have the forum the thread is targeted at as a column of the thread record
Thanks for the input,
Allia.
|
|
|
|
|
My website, link in signature, uses a total of 5 frames. When initially loaded up, the index.html breaks it into a banner frame up top for a navigation page, and a body frame below for content. All the content pages load up 3 smaller frames, one for a left margin, one a right, and one main content. It sounds complicated but it makes sense to me. Anyways, the title bar across my web browser always reads the title tag from index.html . How can I get it to read the title tag of the page in the lower frame?
The question "Do computers think?" is the same as "Can submarines swim?"
DragonFire Software
Jeryth
|
|
|
|