|
Guyz,
how can Clear Browser's Cache after hitting Logout Button?
If I press back button after logout, it's going to previous page.
How can block this ?
Expecting ur replys...
Thank you
Mohamed Nazeem
|
|
|
|
|
Put following code in to your page load..
Response.Buffer = True
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D)
Response.Expires = -1500
Response.CacheControl = "no-cache"
Sherin Iranimose
|
|
|
|
|
I work in a web development team of 2 people.
I always just use document.getElementById('blah')
My co-worker always uses a "getLayerObj" function and includes a reference to a 24KB javascript file (dynlib.js) just to use this.
<br />
<br />
function getLayerObj(LAYERID) {<br />
if (ie4) return document.all[LAYERID];<br />
else if (ns4) {<br />
var tempLayerObj = null;<br />
var tempParentObj = (arguments.length == 1) ? document : arguments[1];<br />
for (var tempLayerLoop in tempParentObj.layers) {<br />
var tempObj = tempParentObj.layers[tempLayerLoop];<br />
var tempConstructor = tempObj.constructor + '';<br />
if (tempConstructor.indexOf('function Layer()') != -1) {<br />
if (tempLayerLoop == LAYERID) return tempObj;<br />
else if (tempObj.document.layers.length > 0) tempLayerObj = getLayerObj(LAYERID,tempObj);<br />
}<br />
}<br />
return tempLayerObj;<br />
}<br />
else if (dyn) return document.getElementById(LAYERID);<br />
}<br />
My opinion is this is unnecessary.
I'm trying to get a feeling for whether mine is a minority or majority view so I'd be grateful hearing what everyone elses practice is?
Cheers.
|
|
|
|
|
I'm with you: getElementById is recognised by all modern browsers on both PC and Mac, and IMHO if anyone wants to use something else that's their lookout; It's hard enough (well, ok, time-consuming enough) to code HTML, CSS and Javascript to cope with the major browsers and platforms without having to pander to *every* alternative out there. Somewhere down the line, users have to take responsiblity by using compliant browsers.
Compliant browsers? Someone's going to say "That rules out IE then!" No it doesn't... I'd like someone to tell me by what right w3c and their affiliates determine standards? I don't remember voting for them any more than Microsoft... in fact, I *did* vote for Microsoft:- with my wallet by buying their products.
Fred
|
|
|
|
|
Fred_Smith wrote: I'd like someone to tell me by what right w3c and their affiliates determine standards? I don't remember voting for them any more than Microsoft...
If you check the W3C member list[^], you will see the Microsoft Corporation is one of them.
---
single minded; short sighted; long gone;
|
|
|
|
|
Well of course they would be. That's politics for you. Point is though, Microsoft are the big boys, the winners if you will, and the winners always write the history...and set the standards. What's the point in winning otherwise? Why strive to run faster than everyone else if someone else is going to come along and say you're not allowed to run faster than your competitors?
Fred
The line it is drawn
The curse it is cast
The slow one now
Will later be fast
As the present now
Will later be past
The order is
Rapidly fadin'.
And the first one now
Will later be last
For the times they are a-changin'.
|
|
|
|
|
Fred_Smith wrote: Well of course they would be. That's politics for you. Point is though, Microsoft are the big boys, the winners if you will, and the winners always write the history...and set the standards.
But as they are members, that makes your point pointless. Microsoft is part of the group that has set the standards, and that group is W3C. By being a member, Microsoft has acknowledged W3C as being the group that sets the standards.
---
single minded; short sighted; long gone;
|
|
|
|
|
Very, very, very few people still use Netscape 4, even fewer IE4. If you're aiming at the general population, your time would be better spent making sure Opera and Safari or even the last Mac IE render properly. Unless you are stuck supporting in-house users that are all deeply in love with it, i'd drop IE4/NS4 support faster than a hot chunk of iron.
Heck, even if you do have NS4 users in-house, your time would probably be better spent upgrading them to FF or IE7. This is hardly the only work-around you'd need to properly support such older browsers.
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
Thanks for the responses so far.
We're not trying to support IE4 and NS4 explicitly, we don't test our sites in them and I know for a start the code I've written won't work in them as well as very likely things like our tree view and menu controls and pages that use AJAX!
Related to Shog's point actually and going off on a bit of a tangent does anyone know where I can get reliable browser usage stats for the web as a whole?
I know the w3c stats page but it's not a representative sample.
Do any of the mega sites (e.g. Google, Yahoo, Microsoft) make their stats available anywhere?
|
|
|
|
|
MartinSmith wrote: Related to Shog's point actually and going off on a bit of a tangent does anyone know where I can get reliable browser usage stats for the web as a whole?
Short answer: you can't.
Longer answer: the reliability of any statistics based on user agent strings is somewhat poor; while well-behaved spiders will identify themselves as such, there are plenty of spam bots and site scrapers that will identify themselves as browsers to avoid detection. And even if this wasn't true, unless you're setting up the next Google or Y!, Google and Y! stats aren't even applicable - you might have a very different set of users, and browsers that are a tiny minority among visitors to those sites could be a sizable percentage of visitors to yours - or completely non-existent.
The best suggestion i can give you (if your site is already live) is to analyze your own logs or use a service such as Google Analytics[^] to collect information on who is visiting with what browser. And then, take it with a grain of salt.
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
Good Points.
I'd better dust off my LogParser queries!
|
|
|
|
|
Hello All,
I want to make a website that will contain a number of galleries each gallery will have some photos and each gallery will be in a separate folder with different name, the problem is that I don't know if I can pass the folder name dynamically to the flash to load images within this gallery, or something like that. The main idea is that everything will be dynamically (i.e. I don't know # of galleries or their names, # of photos or their names ...) any ideas? (note: tools that allowed to be used, asp.net, flash, swish, xml, sql)
Thanks
|
|
|
|
|
|
when i run application on simple browser it works.
but when i browse it with mozilla it makes broblem of stylesheet.
|
|
|
|
|
Use the error console, it will exactly print the problems
Stef
|
|
|
|
|
Error: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
this is my code:
System.IO.MemoryStream ms = new System.IO.MemoryStream();
string ipath=Server.MapPath("~/image.gif");
image.Save(ipath, System.Drawing.Imaging.ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/Gif";
ImageMap1.ImageUrl = ipath;
anybody help me.
|
|
|
|
|
jayvaishnav82 wrote: this is my code:
System.IO.MemoryStream ms = new System.IO.MemoryStream();
string ipath=Server.MapPath("~/image.gif");
image.Save(ipath, System.Drawing.Imaging.ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/Gif";
ImageMap1.ImageUrl = ipath;
You mean that this is part of your code? It's not enough of your code to diagnose the problem.
How do you create the image object? Why do you create a memory stream that you don't use? Why are you changing the content type of the page when you are still creating an html page?
---
single minded; short sighted; long gone;
|
|
|
|
|
Wow. I'm guessing that you just cobbled together this code without actually trying to figure out what it does?
The error probably indicates that you're trying to save to an invalid path, or to a location where the ASP.NET user doesn't have write access. But that's hardly the only thing keeping this code from working.
- Stop.
- Think about what you're trying to do.
- Identify what needs to happen in order to accomplish that.
- Write the code to do those things.
- If you are tempted at any point to include even a single line whose purpose you do not know or understand, stop and re-think what you're doing.
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
Does anybody know if it's possible to configure IIS to allow write access to a folder and all it's sub folders to ASP.NET??
/\ |_ E X E GG
|
|
|
|
|
I am not sure if you are asking it you can do it through programming in C#. If you are, then the answer is no. If you are talking about manually, then yes you can. You have to look at what the identity of your app pool is running as. Be default it is aspnet. So you can give aspnet and iis_WPG access to the folder and subfolders. You should make sure to give mimimum access that is needed, since in general you really don't want to give IIS rights that it doesn't need. Just make sure that whatever rights you give to the aspnet user you all give to iis_wpg group.
Hope that helps.
Ben
|
|
|
|
|
IIS does not control disk access.
Open the properties for the folder and go to the security tab to change file access for users. The account that is used for running ASP.NET code is usually ASPNET or IIS_WPG.
---
single minded; short sighted; long gone;
|
|
|
|
|
As long as you are only concerned abnout doing this on your own, private development machine, I have found the simplest way to deal with this "problem" is to add a line like the following to the web.config file of the application:
<identity impersonate="true" userName="XXX" password="YYY" />
where XXX/YYY is a(n) administrator login for your machine. Make sure you don't upload this to the deployment server... I only resorted to this because for reasons I never could fathom I had a hell of a job trying to configure the ASPNET account to have write access. But this works.
cheers
F
|
|
|
|
|
Can some body help me with the steps of web setup project with VS2005.
|
|
|
|
|
|
hi all if any one got the cause please send the remedy to phani.mca2k4@gmail.com
i am using .NET 2005 and DB2 Ver8.0 and i published my web application
when i browse this page through "localhost" i got the home page LOGIN.aspx
and when i am trying to log-on it will give the error as
==============================================================================
The 'ibmdadb2' provider is not registered on the local machine.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The 'ibmdadb2' provider is not registered on the local machine.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The 'ibmdadb2' provider is not registered on the local machine.]
System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) +975902
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +118
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +53
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
_Default.LoginButton_Click(Object sender, EventArgs e) +43
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
==============================================================================
how to resolve this please any one know reply soon
its my project work and i cant able to browse even the first page.
Phanindra.Tsk
|
|
|
|