|
Hi....
To All....
I have face One Problem in asp.net 2.0 with C#.
I have developed one registartion page in which there is one Text box control.
So i have to check this text box control with data base data when user enter the data without post back.
for example::
when user enter the "email id " in text box control and if there is same email id in data base then user has propmt that "email id " is already there without post back of page
with regards
Lad Ashish
|
|
|
|
|
You must post back unless you want to download the entire list of emails to the browser which would take up a lot of bandwidth and be a privacy concern.
Your best approach would be to use AJAX where the postback takes place without disrupting anything else on the page.
|
|
|
|
|
Hi there,
I am trying to check that if the file is already there in a folder of ftp or not with following:
file_exists("ftp://ftpUserName:ftpPassword@ftpAddress/ftpUploadFolder/folderName/fileName.doc")
but I can not get the result and the same for 'filesize()' function.
If you know the way then please tell me.
Thank you in Advance.
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Those functions mainly will only work on the local file system. You can use the:
is_readable('LOCATION');
function which should work for FTP but other than that you may need to use the PHP functions to determine the size.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
I wrote following code in php :
$uploadDir = "ftp://$ftpUserName:$ftpPassword@$ftpAddress/$ftpUploadFolder/$folderName/$fileName";
if(is_readable($uploadDir))
$msg = "$fileName is already exist. Your File is Not Uploaded";
else
$msg = "File Uploaded";
I am uploading a file that is already exist yet it is showing me the secons message that is "File Uploaded"
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Try using the built in FTP functionality then, this is what it is meant for.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Even I used is_file("fileName") function too but the result is not proper.
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Ok here is what a quick toss around of ideas in my head brought up:
$fileList = ftp_nlist($con, "/upload/Directory/etc");
if(in_array($fileName, $fileList)){
echo 'File already exists!';
exit();
}
Last modified: after originally posted --
Brad
Australian
- Bradml on "MVP Status"
If this was posted in a programming board please rate my answer
|
|
|
|
|
Guys,
First I used the event OnChange on an INPUT/text object. This one only fires when you move the focus away from the field and our client wants the application react immidiately. I found the onKey Up/Down/Press events, but apparently only the onKeyPress seems to work. This is however also not exactly what we want, because it only fires if you type a second character.
Do I need to do something special when using the onKey Up/Down events? They don't seem to fire...
Many thanks!
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
If you want the application to react immidiately that you need to use javascript. I don't know if that is an option for you or not. If you are already using javascript I am not sure why it isn't firing right away with the first character.
Ben
|
|
|
|
|
kubben wrote: If you are already using javascript
yes I am...
thanks.
|
|
|
|
|
I found the problem .
I checked my code in the webbrowser itself instead of embedded in the application ... it works.
thanks for your help.
|
|
|
|
|
keyup / keydown should work. Please post:
- A small piece of code that illustrates the problem.
- The browser(s) and operating system(s) you're testing with.
----
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
|
|
|
|
|
<input size="30" maxlength="15" id="txtbox_license" onKeyDown="OnTextbox_Changed('vehicle', 'txtbox_license');" />
I've tried onKeyDown, onKeyUp and onChange .
onChange works, but only if the textbox looses focus. (which is not what they want)
onKeyPress works, but only if you type a second character. onKeyUp and onKeyDown also don't seem to work immidiately.
The function that handles the event works correctly.
many thanks.
|
|
|
|
|
Can you post the event handling method?
|
|
|
|
|
I'm not sure if I may.
If it is any help, my first statement is debugger which fires when I use the onchange event, but not when I use the other ones...
these are the first lines:
function OnTextbox_Changed(page, id){
debugger
var txtboxid = page+id;
document.getElementById(id).value = document.getElementById(id).value.toUpperCase();
switch(txtboxid){
}
note that this works perfectly when using the onchange method !
anyway thanks for the effort in any case !
|
|
|
|
|
I found the problem .
I checked my code in the webbrowser itself instead of embedded in the application ... it works.
thanks for your help.
|
|
|
|
|
Ok... Let's try something else. Throw this in a little test HTML file. It should display what you type, as you type it. Let me know how this fails.
<script>
function ShowText()
{
var input = document.getElementById("input");
var output = document.getElementById("output");
var txt = input.value;
if ( output.textContent != null )
output.textContent = txt;
else if ( output.innerText != null )
output.innerText = txt;
}
</script>
<textarea id="input" style="width:90%;height:6em;" onkeyup="ShowText()"></textarea>
<div id="output"></div>
----
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
|
|
|
|
|
Dude,
this seems to work.
I'll analyze what you did and try to implement it.
I'm curious though, at first site, it looks like you did the same I did.
thanks for this effort !
|
|
|
|
|
I found the problem .
I checked my code in the webbrowser itself instead of embedded in the application ... it works.
thanks for your help.
|
|
|
|
|
Hi,
Please use this code.
I have used this code for numeric characters.
|
|
|
|
|
How to access Internet explorer favourites in ASP or in javascript
-- modified at 7:55 Wednesday 7th March, 2007
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
If you want to add one, you need to do:
window.external.AddFavorite(location.href, document.title);
If you want to play (ie: edit, delete, see other fav's) with them, i don't think it is possible because of security reasons.
-m
|
|
|
|
|
Don't.
Those are the users', not yours.
----
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
|
|
|
|
|
hi
this is malayappa
we have a game developed in Little Movie processing source format i.e
.LS extension and we need a compiler to compile the LS files in windows.
please help in this regard
Thanking you
malayappa
|
|
|
|