Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment   Page 2 of 2      Prev   1   2
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,925
Reply with quote  #16 
Great! That's a good alternative.

Hi Eshan,

Try to visualize what's in the image below. The sample FileUpload name is ImageNote1:
accept&validate.png 
HTH,
Jimi J


__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

ehsan.haque

Registered:
Posts: 14
Reply with quote  #17 
Wow! Jimi (and VMNZ) you made my day. Jimi thanks so much for the screenshot, it helped me so much. 

The only issue was the expression

ValidationExpression="(.*\.([dD][oO][cC])$)" did not quite work, even if you uploaded the right file 
it would throw the error message regardless.
I have used the following expression instead

ValidationExpression="([a-zA-Z0-9\s_\\.\-:])+(.doc|.docx|.pdf)$"

It is now working like a charm!

Thank you both (JIMI and VMNZ). I am sure a lot of users like me will be benefited from this solution. 

Thanks Guys!
Cheers
Ehsan

__________________
Ehsan Haque
vmnz

Registered:
Posts: 32
Reply with quote  #18 
No problem, Ehsan.

Jaime [thumb]

I would also try this (more flexible?) validation expression:
Code:
"^.+\.(([pP][dD][fF])|([dD][oO][cC])|([dD][oO][cC][xX]))$"


Also, if you wish to suppress initial red validation text, you can move the validation control to a separate cell (i.e. last cell in the row), and then in cell's property (right-click on the cell and select Style --> Cell) add style with value display:none;

Capture.PNG 

This will only display pop-up message when a user clicks on Save button, without showing the red validation text (as per my previous post's screenshot).

ehsan.haque

Registered:
Posts: 14
Reply with quote  #19 
Hi Jimi,

This works ok for a Record control but does now work for a table control. Is there a reason why it is not working with a table control? (unless I am doing something wrong!)

Thanks
Ehsan

__________________
Ehsan Haque
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Download Iron Speed Designer

Terms of Service Privacy Statement