Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 12th, 2009, 08:20 AM
Authorized User
 
Join Date: Apr 2007
Location: Delhi, Delhi, India.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Playing videos using XML

Hello Friends,

I'm playing video(s) in my web site. The details of the videos are stored in a XML file and the information are displayed in the gridview. There is play button in each row and as i click on the play button a video of that row is played. But there is problem is IE its caching the videos and playing the same video even i click on other video button. Its working fine in Flock and Mozilla.....so suggest the way to come out of that problem
  #2 (permalink)  
Old February 12th, 2009, 04:11 PM
Authorized User
 
Join Date: Dec 2008
Location: London
Posts: 50
Thanks: 1
Thanked 5 Times in 5 Posts
Default

the best way would be to add current time to the path of the videos

say if path of video is

http://www.somewebsites .com/video.flv

change it to

http://www.somewebistes .com/video.flv?time=23844839

so on each refresh of the page the time will be different and will not be cached by the browser.

thanks
  #3 (permalink)  
Old February 14th, 2009, 12:46 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

Please clarify your situation. Do you reuse filenames over time for different videos?

Last edited by PeterPeiGuo; February 14th, 2009 at 12:55 AM.
  #4 (permalink)  
Old February 14th, 2009, 01:01 AM
Authorized User
 
Join Date: Apr 2007
Location: Delhi, Delhi, India.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here i'm again explaining my problem below.


I've a gridview in that gridview i've taken a commmand named "Play" for playing different-different songs and also songs name are unique. Its working fine in the browser "Flock" but caching those videos in Internet Explorer.
here i'm giving the link where i've uploaded it.

http://www.saamstesting.com/Admin/VideoUpload.aspx[^]

Last edited by Manoj Bisht; February 14th, 2009 at 01:23 AM.
  #5 (permalink)  
Old February 14th, 2009, 12:08 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

There was only one row there in the grid, if you put multiple rows we can understand better and be more helpful.
  #6 (permalink)  
Old February 16th, 2009, 12:23 AM
Authorized User
 
Join Date: Apr 2007
Location: Delhi, Delhi, India.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now i've uploaded more than one videos. I think it'll be easier to understand what i want to explain
  #7 (permalink)  
Old February 16th, 2009, 01:13 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

The filename displayed at the top is always one step behind - it shows the file from last click not the current click. That I believe is an issue with event sequence. But that doe snot explain why the video played is always the same one.
  #8 (permalink)  
Old February 16th, 2009, 01:30 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

The problem goes away once I set IE to reload page on every visit - done through temperary internet file setting.

I suggest that you try to set cache control to no-cache in your http response, and see whether that solves the issue. Good luck!
  #9 (permalink)  
Old February 16th, 2009, 01:34 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

By the way, I know why the ?time= trick didn't work - because that's not the url, not from IE's point of view.
  #10 (permalink)  
Old February 16th, 2009, 02:07 AM
Authorized User
 
Join Date: Apr 2007
Location: Delhi, Delhi, India.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've set the code given below for stopping page being cached. But still getting same problem

Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading videos!! ankur_icfai Javascript How-To 1 November 9th, 2006 10:34 AM
Streaming Videos pritambaldota ASP.NET 1.0 and 1.1 Professional 0 August 18th, 2006 07:53 AM
Download videos rajanikrishna HTML Code Clinic 1 October 27th, 2005 06:07 AM
Streaming Videos everest General .NET 0 October 13th, 2005 10:08 AM
Playing music in C# Fightfish C# 0 June 26th, 2005 09:09 AM



All times are GMT -4. The time now is 04:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.