|
Hi to everyone,
I'm trying to write a code for a webcam that is able to take picture from the web-site, web based. Meaning the person open the web site and it can use the webcam on it's own PC to take a photo of him/her-self. I'm using both asp.net and VB to do this. The area i'm stuck in is the getting to use the webcam in web-base. How can i go around doing this?
Thanks in advance
Max
|
|
|
|
|
max_sp07 wrote: I'm trying to write a code for a webcam that is able to take picture from the web-site
You are totally lost. Web application can't interact with web cam and take photos.
|
|
|
|
|
Accessing the webcam means accessin the computer resources which is impossible through ASP.net
You need to create an ActiveX control (preferably built on VB6) in order to capture the photos
Best Regards
3ala2
|
|
|
|
|
just3ala2 wrote: Accessing the webcam means accessin the computer resources which is impossible through ASP.net
You need to create an ActiveX control (preferably built on VB6) in order to capture the photos
Hi to 3ala2,
Can u help me by providing the code for it. Really don't know how to do it. Or do u have any reference for it, so i can study on it.
Million of Thanks.
Max
|
|
|
|
|
Hi all,
I am adding 3 session variables in login page. These session variables are added when user logins into website.
All these session variables i am using almost in all the pages to retrive the information from database based on the session variables.
And also i am using these session variables in master page.
I set session timeout to 60 min in web.config.
The problem is when ever i submit data of page to server , the old session variables are lost. The new session is started.
But i have to keep old session variable until user logouts from the website...
Please help me.. How to do that...
Thanks in advance.
|
|
|
|
|
It would be good if you can post some code.
|
|
|
|
|
Did you clear the session any where?
are you using Global.asx file ?
cheers,
Abhijit
|
|
|
|
|
Hi Abhijit Jana,
Thnks for your reply.
I have not cleared my session any where.
and i am not using any Global.asax file.
cheers,
sekhar
|
|
|
|
|
can you put the code over here ?
cheers,
Abhijit
|
|
|
|
|
Page 1:
=======
Pageload Event(...)
{
If(!Page.IsPostBack)
{
if(Session["id"]!=null)
{ // Getting details from data base based on session
//and loading into gridview
}
}
}
Button1_Click(..)
{ Response.Redirect("Page2.aspx",false); }
==============================================
Page 2:
=======
PageLoad Event(...)
{
If(!Page.IsPostBack)
{
if(Session["id"]!=null)
{ // Getting details from data base based on session
//and loading into gridview
}
}
}
Button_Submit_Click(...)
{
//Getting the datails of TextBox Controls
//Loading into appropriate columns of table in database
// Saving it into Database table
}
-------------------->Here is yhe problem after this event completes the old sessions were ended. New Session is started(When i trace this application i observed that)
link_btn_Back_Click(...)
{
Response.Redirect("Page1.aspx",false);
}
......................................
when i click back button, the page is redirected to Page1.
but in Page load event of Page1 ..i am loading details into gridview based on Session["id"].
But nothing is loaded into Gridview ..bcz of old sessions were Ednded.
This is my snippet, i hope you understand.
Cheers,
sekhar
|
|
|
|
|
Hi all,
I have to display all types of images including flash imges to user.
I could able to display images of all formats except .swf(flash) files
in Image Control of asp.net.
For Displaying .swf(flash)images i used FlashConrol(from FlashControl.dll).
This control is only displayinf images of type .swf, but i want to display all types of images under single control(asp.net control / third party control).
Is it possible ?
If yes!, How?
Please help me.
Thanks in advance.
|
|
|
|
|
Have you tried using a literal to display the images?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your reply.
Using a literal ? Do you mean Literal control ?
If that, how can we display images in literal control..
Cheers,
sekhar
|
|
|
|
|
Yup, a literal control. Here's an example:
literal.Text = "<img src=\"picture.jpg "\" />";
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your reply,
But i have to assign the path at runtime. and there is a Previous & Next buttons in my page .
i have to show the next image when user clicks on Next, previous image when user clicks on Previous buttons.
I am storing image in diffrent folders, the path is stored in database table.
So how can i use this literal control. Is literal control displays Flash images(.swf files).
Please help me...
Cheers,
sekhar
|
|
|
|
|
That shouldn't be a problem. Just edit the code where needs be to allow for this. So just put the code in event handlers of the next buttons and use a count to increment and decrement clicks on the buttons so the events are registered.
I'm not 100% sure if it displays flash images but it can be used as a container for the player you mentioned that you downloaded. I know it definately works for images and as a container for a mediaplayer to display videos.
Here's code for the video:
mplayer.Filename = "video.flv";
mplayer.autoStart = false;
ltlMplayer.Text = mplayer.getval();
Hope that helps you
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your reply. I dont have any video files to display.
I have to display images of different formats including Flash images(.swf files).
In image control i could able to display all type of images except .swf(flash images).
Here is my problem. I want to display all in single asp.net control.
Cheers,
sekhar
|
|
|
|
|
I realise this but Flash works similarily to videos when being displayed so try the example i gave you and modify the code so it works for you otherwise i'm sorry i don't know what else to suggest
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi,
Thanks for your help.
Cheers,
sekhar
|
|
|
|
|
Hello All,
I need to validate http://www.pfizer.com/news/rss_article.jsp?rssUrl=http://mediaroom.pfizer.com/portal/site/pfizer/index.jsp?ndmViewId=news_view&newsId=20080610006500&newsLang=en
URL and also http://www.pfizer.com/news/rss_article.jsp
Below is the code which I am using but it validates first one but not the second one.
function ValidateURL()
{
var Url = "(((ht|f)tp(s?):\/\/)|(www\.[^ \[\]\(\)\n\r\t]+)|(([012]?[0-9]{1,2}\.){3}[012]?[0-9]{1,2})\/)([^ \[\]\(\),;&quot;'&lt;&gt;\n\r\t]+)([^\. \[\]\(\),;&quot;'&lt;&gt;\n\r\t])|(([012]?[0-9]{1,2}\.){3}[012]?[0-9]{1,2})";
var tempURL=document.getElementById("ctl00_ContentPlaceHolder1_txteventlink").value;
var matchURL=tempURL.match(Url);
if(matchURL==null)
{
alert("Web URL does not look valid");
document.getElementById("ctl00_ContentPlaceHolder1_txteventlink").value="http://";
document.getElementById("ctl00_ContentPlaceHolder1_txteventlink").focus();
return false;
}
}
Please help me....
Thanks in advance...
|
|
|
|
|
Hi,
How can i call a server side methods on browser close ?
Please help. Thanks in advance !!
cheers,
Abhijit
|
|
|
|
|
Abhijit Jana wrote: How can i call a server side methods on browser close ?
AJAX. Hook the JS close event and make a AJAX call in the event handler.
|
|
|
|
|
Hi Navaneeth,
usign PageMethods Server side function is calling but nothing is executed. I have put some breakpoint insed the fuction, just came to the function name and then nothing executing after browser close.
please help .
cheers,
Abhijit
|
|
|
|
|
I want to End seesion on Browser close?
cheers,
Abhijit
|
|
|
|
|
Abhijit Jana wrote: usign PageMethods Server side function is calling but nothing is executed. I have put some breakpoint insed the fuction, just came to the function name and then nothing executing [Frown] after browser close.
I am not getting you. What do you meant by page methods ? When browser closes some JS event fires. Do AJAX call inside that event which executes a page on server.
Abhijit Jana wrote: I want to End seesion on Browser close?
Yeah, I guessed it. This is most asked question. But there is no reliable way to do this. You can always use AJAX call to end session when browser closes as described above. But it's not reliable.
Why you need to end session when browser closes ? Sessions will have a timeout and will end automatically,
|
|
|
|