|
Here is a script that will help you out-
<head><script type="text/javascript">
function countDown(start) {
if (start>0) {
var next=--start;
document.getElementById("cd").innerHTML=next;
setTimeout("countDown("+next+")",1000);
}
}
</script></head>
<body>
<input type=text id=start>
<input type=button onClick='countDown(getElementById("start").value)'>
<div id="cd"></div>
</body>
The page offers a text box. Put in a value and hit the button. It will begin to countdown until 0. As said above, it is not necessary to continually call the server using AJAX commands. That will generate a hit on the server for every user, every second. Instead, let the browser do the work. Good luck!
Ranjit Viswakumar
Professional Services Specialist
HostMySite.com[^]
|
|
|
|
|
Hi,
I have deployed my webapplication in other system MSI installer and when one of my form.cs(code behind file) is trying to access an XMl file an error occurs like....
Access to the path C:\Inetpub\wwwroot\MyApplication\XML\user.xml is denied
Even i have added Username="SYSTEM" and Password="AutoGenerate" in in machine.config file... and the error continues Please help me out..... im using IIS 5.1.. and Windows Xp pro
|
|
|
|
|
you do not have access on perticular folder give and access on perticular folder
Regards,
Navaid Aijaz
|
|
|
|
|
I have to give permissions thru script or exe but not manually ...BUt any way i made aspnet process to run under system account then should i again set permission for accessing a folder..?
|
|
|
|
|
Is there a way to get the contendId (cid) from mail message. Actually, I have got an application which has a drag and drop utility. Here we can drag the emails from outlook and it gets displayed within an editor (TXTextcontrol) from where, the user can edit the mail and send it. The problem I face now is that when I drag and drop, the images present in the mail is not displayed in the editor. I use mailmessage service to take the dropped mail onto the editor. I tried rewrighting the html body by replacing the image embeding syntax (where it uses ) with the new syntax where I save the attached images to a folder and specify the src as that path (). The problem is that while replacing the syntax, I am not able to get a relationship with the CID present in the original syntax whith that of the filename.
If I could get the cid from any of the attributes of mailmessage, my problem will be solved. Is there a way to get the cid. Please help me..............
Thanks in advance
Sebastian
|
|
|
|
|
Hi,
I have a form Changepassword.aspx.
In that i have password field.I want that password field should accept at least 1 numeric 1 alphanumeric and it should be minimum 7 characters long and maximum 20 characters.
how can i do that using java script or in c#.
Please provide any helpful link related to this or provide me some code to achieve this task.
regards,
Pranav Dave
|
|
|
|
|
Loop through each character of the password and count the numeric,alphanumeric or special character as per your requirement...
if any of the counter is zero show the messagebox and dont let user to proced..
vikas da
|
|
|
|
|
As per the first answer, or you could use a regular expression to validate the input. Has the advantage of only the expression needing to change if you decide to change your validation.
|
|
|
|
|
Here you go. I used this script on one of my sites-
function validatePassword(fld) {
var error ="";
var pwdFilter = /^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*$/ ;
if (fld.value.length < 7 || fld.value.length > 20) {
error += "-Password must be 7-20 characters\n";
}
if (!pwdFilter.test(tfld)) {
error += "-Password must contain at least 1 number, lowercase, and uppercase\n";
}
if (error != "") {
alert("Some fields need correction:\n" + error);
return false;
}
return true;
}
That is the Javascript validation. You can call it onSubmit of a form-
<form method=POST action=register.aspx name=demo onSubmit='return validateForm(this)'>
Try that out. Good luck!
Ranjit Viswakumar
Professional Services Specialist
HostMySite.com[^]
|
|
|
|
|
If you have the regular expression, just use a RegularExpressionValidator. Saves wiring up your own validation routine!
|
|
|
|
|
Asp.Net Validation Controls
Open This URL
jpsprince.blogspot.com/2009/02/aspnet-validation-controls.html
|
|
|
|
|
Hi,
I have an HTMLForm of a page in Session.
I change the form object (add a control) in another page.
Now how could I render the first page again to apply chages?
Best wishes
|
|
|
|
|
If you are posting back from PageA to PageB, and then want PageB to render PageA, that isn't possible in ASP.NET. Each page can only render itself...however it is possible to post back from one page to another, or transfer control on the server from one page to another.
The only solution to your problem that I can see would be to post from PageA to PageB, let PageB do its thing, then Server.Transfer back to PageA and add the control to the form of PageA and let it render. The problem with this is that the URL displayed to the user will probably be the URL of PageB, not PageA. You won't be able to modify the form of PageA from PageB either...each page would modify its own UI.
|
|
|
|
|
I have a measurement device that measure and sends a data update string to the PC once a millisecond, so you can see what's happening in real-time. I would like to let authorized people see my data via the web in roughly real time using a web browser such as Internet explorer. I have an internet connection with valid IP address that whole of day is connected.
My idea so far, is to divide the problem into originator (my PC putting data on database) and clients (pc's logging into my computer via web browser to see latest data).
Originator:
I thought I would use SQL database to save average measured data into the database every one seconds.
Clients:
This has to log in, see designed GUI, select charts, table and reports via menu.
I want to keep it in C#.
I am very keen to hear any suggestions
Does anyone know how I can do this?
With best regards,
|
|
|
|
|
At what point are you facing issues? What is your question here?
|
|
|
|
|
thanks for your reply
i have no knowledge about asp.net, please introduce me from basic , i need some references to learn, sample project and any thing can help me.
also i need put report, chart and menu in my program ,is it possible ?
|
|
|
|
|
mehdy_137 wrote: i have no knowledge about asp.net, please introduce me from basic
You need to buy a book and workout the examples provided. When you learn things, go and start the project. Whatever you asked can't be done without having a knowledge on ASP.NET. This site got many articles and sample projects. But as a beginner, I recommend reading a book before you look at the articles.
All the best
|
|
|
|
|
tnx.
i desinged the program in c# for local computer( windows applicatin ), my main problem is communication via internet browser.
do you think i have to design a new program at first ?
can you introduce me a sample similar project?
|
|
|
|
|
|
Hello All
I get a problem that i need to call a C# function on aspx page through javascript.but i don't how how I call this one.
Any help would be Appreciated
Amit Gautam
|
|
|
|
|
use
your c# functions.....
|
|
|
|
|
I already have my function on mypage.aspx.cs page. I want to call this on aspx page. so how can i do this
|
|
|
|
|
AJAX[^] is the answer. To make things easier, use AJAX toolkit for ASP.NET.
|
|
|
|
|
i'm not much aware about Ajax.Could you tellme the any other.I have my function in aspx.cs page I call this on aspx page
|
|
|
|
|
What the hell is wrong with you? You ask a question, you're given the de-facto answer and you want a different way of doing it just because you're not familiar. How do you think people learn new concepts?
|
|
|
|