|
Hi i have a prob,
I dont know how to retrive application Path in traditional asp.
its very urgent could you please help me out.
thanks a lot.
clife.
-- modified at 2:15 Sunday 28th October, 2007
chandu
|
|
|
|
|
I think you can make it by using Server.MapPath() combined with a bit of string operation.
Please let me also know if you got the better solution.
Thanks.
|
|
|
|
|
I erase some code in the source file in Visual Studio. (For example in Default.aspx.cs) And I save the file and close the Visual Studio 2005 IDE. How can I get back to erased code. Undo action is not working.
|
|
|
|
|
Is your project Connected to VSS(Visual Source Safe ), Files stored and organized in the VSS? If not then you can't rollback the changes.
Regards - J O H N -
|
|
|
|
|
I've Googled this question to death but can't seem to find an answer, but how can I get hold the the raw html response just before it gets sent to the client? The idea being that I want to do something with the final rendered HTML then send it to the client browser, such as compact it, or transform it with an XSLT etc. Can I also do the same thing with css style sheet files and JavaScript files?
|
|
|
|
|
See how Scott Mitchell emails the rendered output.
as for the css have the css text file points to an aspx instead of a css.
key words to search for "Stream Render Response"
clickity http://aspnet.4guysfromrolla.com/articles/091102-1.aspx[^]
Cheers.
/*
Ghazi Hadi Al Wadi, PMP, ASQ SSGB, DBA
*/
|
|
|
|
|
Hi,
I'm new to ASP.NET but not to C#. I'm re-using some classes i wrote for a windows app that have some Trace messages in. I want to be able to view them in DebugView (http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx)
I've made it so the Page.Trace messages get chucked out to DebugView by adding:
<trace enabled="true" requestlimit="20" writetodiagnosticstrace="true ">to the Web.config file, but the question is, how do i make it so the Diag.Trace messages are also picked up by DebugView.
Regards,
Gareth.
|
|
|
|
|
Hi,
I have followed the below URL:
http://msdn2.microsoft.com/en-us/library/b0ectfxd.aspx
But still, i can only see the Page.Trace messages and not the Diag.Trace. Any ideas?
Regards,
Gareth.
|
|
|
|
|
OK, I solved it:
<system.codedom><br />
<compilers><br />
<compiler language="c#;cs;csharp"<br />
extension=".cs"<br />
compilerOptions="/d:TRACE"<br />
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="1" /><br />
<compiler language="VB"<br />
extension=".vb"<br />
compilerOptions="/d:Trace=true"<br />
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><br />
</compilers><br />
</system.codedom>
http://www.alexthissen.nl/blogs/main/archive/2007/02/11/viewing-diagnostics-trace-info-in-an-asp-net-website.aspx
Regards,
Gareth.
|
|
|
|
|
|
what particularly is the problem?
Regards - J O H N -
|
|
|
|
|
I Think you are looking for:
Cookies
Session
This is typical Login behaviour. If you logout, cookies get deleted. so if you refresh the same page in diffrent browser It woud redirected to login page.
ps: When i said diffrent browsers i dont mean IE to Firefox, but to have open 2 instances from same family
|
|
|
|
|
Don't delete your post, because others might be able to help you or learn from it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
How can I use the ability of GridView's Update and Delete, but don't display SQL statements in aspx file?
i.e I want my SqlDataSource don't display queries in aspx file, but use of Edit and Delete.
Best wishes
|
|
|
|
|
Why don't you want the query in the aspx file, and where would you like to store it instead?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
If you use wizard to connect SqlDataSource1 with connecitionstring and initialize with SQL commands then you can not hide it from .aspx file.
Try to give SQL command to SqlDataSource1 inside .cs file
I Love SQL
|
|
|
|
|
You could always go with stored procedures...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
i am not able to see the user id. When i debugged it Page.User.Identity.Name was returning null string.
What is actually the problem. What should i do to get rid of it.
-- modified at 12:06 Saturday 27th October, 2007
Pandi
|
|
|
|
|
In my site I want to keep track of online users.I want to have a page that lists the current online users. I know that I have to add the user who logs in to a variable stored in application object. But I need to remove the user who exits the site(logs out). But the users don't need to explicitly log out in order to make their authentication ticket removed as they can close the browser window other than clicking the logout link. My problem is how to remove the user from the "logged in users list" stored in aplication variable when they exit by just closing the browser window.
|
|
|
|
|
Not sure about what your specific requirements are, but I have kept track of online users in my web apps by keeping a table in the database of who is online, where they have gone within the web app, etc.
devboycpp wrote: My problem is how to remove the user from the "logged in users list" stored in aplication variable when they exit by just closing the browser window.
My web app actually looked for idle time and removed users who were inactive past the set idle time.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote:
My web app actually looked for idle time and removed users who were inactive past the set idle time.
Thanks for your answer. can you give me some detail about how you recognize idle users ?
|
|
|
|
|
My web app was actually written in php on a linux box, but the idea can work with asp.net/sql server. What I did was every so often, once a minute or two, run a trigger that checked if the user had been idle for more than 10 minutes, if so, kick them off with a kind "You must log back in" type of message. It is up to you how often you want to check so you don't give the database server too much of a load to deal with.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: once a minute or two, run a trigger that checked if the user had been idle for more than 10 minutes
Tell about the trigger please . What kind of thing is it ? I am sure it is not the trigger concept in SQL. Can you elaborate ?
|
|
|
|
|
Here is a google search on triggers: Triggers in SQL Server[^]
Also, here at CP: http://www.codeproject.com/database/SquaredRomis.asp[^]
Not just using triggers, but have sql server run a scheduled task every so often ( you set the time between runs of the task ) take care of it for you. Maybe have it in a stored procedure.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I already know about triggers well. What I don't know is the "scheduled task" you talked about. How can I define such thing in SQL ? I have not heard anything about it till now.
|
|
|
|