|
Just a little modification required.Use the script below:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript">
var clock;
function stopClock(){
clearTimeout(clock);
}
function yourClock(){
var nd = new Date();
var h, m;
var s;
var time = " ";
h = nd.getHours();
m = nd.getMinutes();
s = nd.getSeconds();
if (h <= 9) h = "0" + h;
if (m <= 9) m = "0" + m;
if (s <= 9) s = "0" + s;
time += h + ":" + m + ":" + s;
document.getElementById('yourclockbox').innerHTML = time;
clock = setTimeout("yourClock()", 1000);
}
</script>
</head>
<body onload="yourClock()", onunload="stopClock(); return true" >
<form id="form1" runat="server">
<div>
<div style="background-color: #fff5ff" id="yourclockbox" ></div>
</div>
</form>
</body>
</html>
If you want to show the element inside a div use innerHTML rather than value. Label1 is also not declared.
|
|
|
|
|
How to get controls from master page to content page & vice versa?
|
|
|
|
|
|
Im creating an asp.net website and i'd like to know if it is possible to use an ajax cascading dropdown with sql stored procedures instead of an xml with webservice if it possible please point me to the right direction
|
|
|
|
|
what u want to do exactly? if u wish to bind the dropdown you can bind it with help of Store proc.
or else explain in detail your requirement.
Regards
Keyur Satyadev
|
|
|
|
|
When the user is interacting with the dropdown menu, i need information to come from the database into the dropdown menu using an sql stored procedure as if it was coming from an xml file and that dropdown control should select information from the database based on the user's choice.
|
|
|
|
|
Hi,
I want to get full path from fileUpload control or htmlFile or java script or every thing that i found in google, but i was unsuccessfull.
Why i get FullPath in some system but i don't get in aother system for example via( fileupload1.PostedFile.FileName)?
I need it for uploading file using ftp.
How I can get full path,
Plaese help me
Hoda
modified on Wednesday, August 12, 2009 5:02 AM
|
|
|
|
|
What is the need of fullpath ? You will not get. You will get only FileName.
Use Posted file to uplaod the file.
|
|
|
|
|
But I need it for sending file via ftp.
Hoda
|
|
|
|
|
you can get full path using following.
Path.GetFullPath(FileUploadControlName.FileName)
Regards
Keyur Satyadev
|
|
|
|
|
I could not.
Thank you
Hoda
|
|
|
|
|
keyur satyadev wrote: Path.GetFullPath(FileUploadControlName.FileName)
The file is not in server side I guess
|
|
|
|
|
I want to upload files from client side to server side via ftp.
Hoda
|
|
|
|
|
Hi experts,
In my application, I do export data from datatable to csv file and import data from csv file. My problem is since csv file uses comma(,) as delimiter it splits text data with comma as two columns.
Ur suggestions r highly appreciated.
|
|
|
|
|
As you said, when you export/import data from the application, comma is specified as delimiter by default.
Why don't you change the delimiter to some other charaters like ~ or # for export/import functionality?
|
|
|
|
|
Put string with comma in Quotations...
<br />
"this, is , a , test",data
Just like this.
|
|
|
|
|
Hi,
I am using this code 'Response.Write("<script>window.close()</script>;");' to close current form in Asp.net . but if i want to close any specific form as "employee.aspx" then what is the code of it.
please help me
Thanks !
Pankaj Singh
|
|
|
|
|
if your page is not opened then what is the use of closing it. You are using any Popup window? or want to close the browser itself ?
|
|
|
|
|
if this is in a new window then use Window.close()
If you are navigating to a page, just navigate to your login page rather than closing the whole browser through your code.
Other than this, you can use
self.close();
to close itself. You must run this from within employee.aspx.
|
|
|
|
|
Hi,
Im creating some little export module of an html page to different file type (xml html pdf etc)
When im exporting the page to html the file download pop up appears.
so far so good , however,
When I choose to open it , it opens on the current window.
How do i open it in another window or tab
thanks in advance
here is my code
StringBuilder str = new StringBuilder();
str.Append("<HTML>");
str.Append("<HEAD>");
str.Append("<TITLE></TITLE>");
str.Append("</HEAD>");
str.Append("<BODY>");
str.Append("<CENTER>");
this.page.Response.Clear();
this.page.Response.AddHeader("content-disposition","attachment;filename=StationData.htm");
this.page.Response.Charset = "";
this.page.Response.ContentType = "application/vnd.html";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
this.page.Response.Write(str.ToString());
this.page.Response.End();
|
|
|
|
|
|
Can you be more spesific about the SetTarget = new
thanks
|
|
|
|
|
use Window.Open from javascript and then call the handler which give you the response you created.
|
|
|
|
|
Use Response.Write(str.ToString()) only
dont use
this.page.Response.Write(str.ToString());
this.page.Response.End();
or try something like this
a new window
|
|
|
|
|
Hi All,
I'll be happy to get your option on this, i have a webservice that uses Semaphore to access shared (VB) resources and i noticed that when there is an high volume of webservice calls the semaphore could no make locks using the WaitOne() method, when using it, it throws an exception "Thread was being aborted." after 2 minutes.
I believe its aprobably a timeout error, but not sure what is the cause..
Can someone please explain what effects the lock? why t could be completed? what effects the timeout and can i configure somthing on the code or IIS or machine level to prevent that?
Thanks
|
|
|
|