|
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
|
|
|
|
|
You can use JavaScript to access the title property of the topmost document (window.top ); set the onLoad handler of your main document to set the title to the title of the current document (document.title ).
Or you could avoid frames On my system, your logo takes up nearly half of the screen and I can't easily link to pages inside your site.
- Mike
|
|
|
|
|
I know nearly nothing of Javascript. Could you give me a more detailed example or code snippet to work with? As for taking out the frames, I'd love to but the banner at the top reloads every time I go to a new page and I'm not sure how to stop that from happening. I guess I could do the whole thing in Flash, but that will take a little bit to complete. For the logo size, I purposely made it less than 800 pixels wide for anyone out there on 800x600 screens. Get a bigger monitor and resolution
The question "Do computers think?" is the same as "Can submarines swim?"
DragonFire Software
Jeryth
|
|
|
|
|
Add this to the body tag in your content frame pages:
onload="window.top.document.title = document.title" This will set the title of the top level document (the frameset page) to the title of the current document.
I've thrown together a downloadable example here:
http://lugatgt.org/rxtemp/[^]
- Mike
|
|
|
|
|
|
Brilliant!
"Your village called - They're missing their idiot."
|
|
|
|
|
In IE there are several ways I can go to a new location from script:
1. call click method of A tag (is there anything like that in nescape?)
2. call window.navigate (there is gotta be this somewhere in netscape)
What does netscape have for that? It's a pin to find info as well. IE's info easy to find in MSDN (obviously) but netscape.... At least I don't know a good place. Can you guys give a a link to their HTML/JavaScript reference?
Better yet. Is there a universaly working JavaScript statement that would navigate to new location?
Thanks a lot. Need it quick too.
|
|
|
|
|
document.location is the way to do it. e.g. document.location = "http://www.codeproject.com/lounge.asp";
It is the DOM standard way.
Gecko DOM reference. Gecko is the engine that Netscape 6+, Mozilla, Firebird etc. runs on. It is even useful for IE6 because it is most of the W3C DOM and most modern browsers support a good level these days.
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?
|
|
|
|
|
Hello,
I would like to copy a particular file from one place on the server to another in an ASP.NET code behind page using c#. I know it can be done using vbscript with something similar to the following code:
SET oShell = Server.CreateObject( "WScript.Shell" )
cmd = "cmd.exe /c copy " & originalPath & " " & destinationPath
rval = oShell.Run (cmd,0,TRUE)
SET oShell = Nothing
I don't actually know what WScript is or does (haven't found a lot of documentation on it). When I try similar code in c#, it says I'm missing a directive.
Does anyone know how to use WScript.Shell with c#? Or, is there a better way to accomplish this with out using WScript.Shell at all?
Thanks for your help,
RC
|
|
|
|
|
Why do you even want to use WScript? Just use the classes in System.IO . You can copy, create, delete, move etc. files and folders.
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?
|
|
|
|
|
Hi,
I'm still rather new to .NET so I didn't know that System.IO had all of these functions. I tried
System.IO.Directory.Move(file1,file2)
and it worked like a charm. Thanks for your help!!
RC
|
|
|
|
|
Cool chubbysilk, glad I could help.
Another tip is to put a Using System.IO; at the top of your CS file and then you can just use Directory.Move(file1,file2); without the namespace reference.
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?
|
|
|
|
|
Hi,
I just ran into one small problem. The System.IO.Directory.Move function works when I copy a file from one folder to another on a single drive. But I am unable to copy a file from the C drive to the E drive. Do you know how to get around that?
Thanks again,
RC
|
|
|
|
|
|
I would like to create a link that will download a file. I know how to do this with a file that does not contain any special characters, however I am having difficulty when the file does contain special characters. Examples of filenames I am attempting to down load are the following:
#_Online Test (NDP's).ucn
cs7101-2part+1mcp.ucn
What do I need to do to download these files from a link within an ASP page.
Thanks in advance.
|
|
|
|
|
Hi,
I'm having problems intercepting the events thrown by an activex control when it is instantiated in a pop-up window.
I am using the <object> HTML tag to instantiate the control within a page. Let's call this page the ocxtest.htm. To intercept the events of the OCX in this page, I use the following syntax:
<SCRIPT LANGUAGE="javascript" FOR="MyObject" EVENT="EventName">
<!--
alert("Hello")
//-->
</SCRIPT>
The OCX is created within a form in order to access some properties and methods from other JavaScript blocks.
If I open directly the page by requesting the URL in my Browser, the event is intercepted and the alert() is executed.
The problem occurs when I want to have ocxtest.htm as a pop-up window, for example, calleng this code from another page:
window.open( "ocxtest.htm", "MyOcxWindow", "width=550, height=500, left=200, top=30");
In the MyOcxWindow, the control is rendered fine, I still have access to the properties and methods and the functionality works properly, however the events thrown by the OCX are no longer intercepted by the window, in other words, in a pop-up window the alert() in the sample code above is never executed.
So,
Are ActiveX controls' events handled in pop-up widows at all?
Is there any extra step that I should take when the control resides in a pop-up window?
Thanks.
|
|
|
|
|
It is a shame!
Hi! I am from China. Our pretty SMART officals of Education Ministry think it is a good idea to use Internet to do the processes of enter for the master entrance examination to prevent hundreds . But they are so SMART that they let some jackaroos to build the system. They use Apache Tomcat and JSP. The system is so slow and it crashed at the first morning it runs.
How to solve to problem?
I think the possible solution is to use Win2003,IE6,ASP.NET and Win Cluster as the Web Server, and use MTS as the connection to SQL Server 2000.
Will it work?
Is there any better way?
Let's roll!
|
|
|
|