|
U can try out for Javascript posted below
Expresso cannot work for the expressions like this. That becomes tough for Expresso.
Try this.. put the code in ur jscript
<br />
function nx(obj)<br />
{<br />
var str = document.getElementById(obj).value;<br />
if(str.length > 3 && str.length < 10)<br />
{<br />
if((str.charCodeAt(2) > 47 && str.charCodeAt(2) < 58) && (str.charCodeAt(3) > 47 && str.charCodeAt(3) < 58)) <br />
{<br />
var c = 0;<br />
var n = 0;<br />
for(i = 0 ; i < str.length ; i++)<br />
{<br />
if(str.charCodeAt(i) > 47 && str.charCodeAt(i) < 58)<br />
{<br />
n++<br />
}<br />
else<br />
{<br />
c++<br />
}<br />
}<br />
if(n < 4 && c > 2)<br />
{<br />
return false<br />
}<br />
else<br />
{<br />
return true;<br />
}<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
return false;<br />
}<br />
The ASCII part is very Improtent to do the task.
I hope that will help
If work let me know.
Believe Yourself™ ™
|
|
|
|
|
Hi Gandalf!
Thanks for the reply. I have done it with different method. Thank you again..
Regards.
|
|
|
|
|
I have a directory 'UploadFiles' in my website, and I can forbidden users to visit via *.ASPX page.
(check users right in *.aspx.cs), but i can not forbidden user to visit via directly input URL in browser. like http://localhost/mywebiste/uploadfiles.jpg
I know the MembershipProvider in .NET Framework, but i think it too complex than i wanted.
and i didn't find any document to help me write a good web.config file.
so how can i solve it?
|
|
|
|
|
WuJunyin wrote: so how can i solve it?
I prefer to write a HTTPHandler which handles JPG extension. Inside the handler, do user authorizations. If user is unauthorized, display relevant messages.
|
|
|
|
|
thanks for your reply.
the JPG files just a kind of 'UploadFiles', it contains many different file types, like bmp, txt, doc, xls, mp3, avi, and so on.
i do not want to add a HTTPHander for all file types....
|
|
|
|
|
I have problem in asp.net configure file when try to go to security tab
but i don't have sql express in my machine
this message appear to me
plz i need very fast soulation because i have schedule tp finish this project or the only soulation to install sql express and work throught it
thanks alot
Message
---------
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database.
----------
md_refay
|
|
|
|
|
Is google[^] broken where you live ?
|
|
|
|
|
i have a dll . and putting a reference of that dll in my web project.
and during allocating the dynamic memory allocation , i got the following exception
Retrieving the COM class factory for component with CLSID {D8AD488C-DB92-4E50-B264-23E7C8F242E2} failed due to the following error: 80040154.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Are you getting this error when you refer it ? What this COM control is doing ?
|
|
|
|
|
Why do you need to use a com component on the server side ? Have you tried taking your code out of the ASP.NET code behind and put it in a windows app to see if that works ? Have you looked up the error code to see what it means ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Dear Friends..
I am having an .aspx application.I need to restrict the CTRL + N key inorder to prevent the opening of my web page a new window..Some one help me with the code..
Thanks & Regards,
Balaguru
|
|
|
|
|
Balagurunathan S wrote: I need to restrict the CTRL + N key inorder to prevent the opening of my web page a new window
It's bad idea to block the keys. You might be able to do this with JS, but it's not reliable. Why you need to block users opening pages in new window ?
|
|
|
|
|
N a v a n e e t h wrote: It's bad idea to block the keys.
I admit.
N a v a n e e t h wrote: Why you need to block users opening pages in new window ?
Some of the financial applications expect this sort of weird behavior.You need to have yeoman patience and skillset to convince those dumb managers.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Vasudevan Deepak K wrote: Some of the financial applications expect this sort of weird behavior.You need to have yeoman patience and skillset to convince those dumb managers.
Yes. But a better approach would be the following.
1 - When user opens the page, we set a flag in DB
2 - Page load, this flag is checked to ensure only one page is running.
3 - When user finishes the operation, reset the flag.
4 - A scheduled job should run frequently which checks the flag value and the time it has started. if it is more than timeout limit, reset the flag.
What do you think ?
|
|
|
|
|
You may need to entrap the keycode for CTRL+N in keydown event and NULL it.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Dear Deepak..
How to Do that..Can u help me with the code..
Regards,
Balaguru
|
|
|
|
|
|
Hi Friends,
I am using Forms authentication in my Asp.net2.0 application.The <forms name=".ASPXAUTH" loginUrl="index.aspx"
defaultUrl="main.aspx" protection="All" timeout="30"
path="/" requireSSL="false" slidingExpiration="true"
cookieless="UseDeviceProfile" domain="" enableCrossAppRedirects="false">
The time out is ="30" .I need to automatically signout my application when timeout reaches..
any idea??
Thanks in advance
They laugh at me; they think I’m different. I laugh at them, ‘coz they are all same!! CrazySanker
|
|
|
|
|
Vipin.d wrote: The time out is ="30" .I need to automatically signout my application when timeout reaches..
When user is idle for 30 minutes, he will be redirected to login page when he requests again. What problem are you facing ?
|
|
|
|
|
Thank you for your reply..
But I need to redirected to login page without making any request again..
ie when the idle time reach 30,automatically go to login page without any hit from user.
is it posiible??
They laugh at me; they think I’m different. I laugh at them, ‘coz they are all same!! CrazySanker
|
|
|
|
|
You can do AJAX request to the server. If timeout limit over, redirect using javascript. But this method is not reliable.
|
|
|
|
|
Hi,
I wrote a function for dynamically create some bound columns and template field in grid view.The template field having check box in header template and item template.
First i have called this function on Page_load (!IsPostBack).
This will work fine.
Then i have checked the check box and click on a button(for delete the checked rows), the check box disappers.After the click event,if i am trying to access the check box from page load ,it returns null.I couldnt access the dynamically created checkbox .
Why it happening? How will i solve this problem?
Thanks
|
|
|
|
|
See when you click a button or and the page loads what ever is there inside !isPostback will be discarded.
You will require to call the binding function in the button click event to get it created again. Or put it outside !IspostBack
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Hi,
Thanks for you reply.But there is another problem. In the buttton click, all other columns expect template field is there as such. The template column is there ,but the control is invisible.If i am creating the control outside !ispostback then i couldnt get the checked row for deletion.
How will solve this.
|
|
|
|
|
jinovv wrote: If i am creating the control outside !ispostback then i couldnt get the checked row for deletion.
Are you creating dynamic controls ? If yes this would be a viewstate problem. Controls created in page_load event won't maintain viewstate. Try any event which fires before viewstate is saved.
|
|
|
|