Is that possible to get the ACSIdx value through OGNL expression ?
I have many ACS in one connection and need to do some action based on ACSIdx value.
I tried using #this.get("ACSIdx") which didnt work.
Any idea on this?
No, you cannot get the ACSidx in an OGNL expression in PingFederate.
Related
I am using ajax mask for entering telephone number and now I want to validate the telephone number too. but I don't know what will be the validation expression to use with it.I have tried some but all vain. So please help me as soon as possible.I want to validate the number like 999-999-9999. Thank You
try this one
\d{3}-\d{3}-\d{4}
^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$
I am using request.querystring just to access a parameter which I am passing from one page to other.
It is giving me an error.
Non-invocable member 'System.Web.HttpRequest.QueryString' cannot be
used like a method.
I am using C#.
Any help would be appreciated!
It sounds like you're writing:
Request.QueryString("Param");
When you want:
Request.QueryString["Param"];
Note the square brackets.
I am trying to get the QueryString value like this Request.QueryString("SYSTEM") from a UrlReferrer. I see i can use this Request.UrlReferrer.Query() but it doesn't allow me to specify the exact parameter
I could parse the Query() value, but I want to know if it is possible to do something like this Request.UrlReferrer.QueryString("SYSTEM")
You could do
HttpUtility.ParseQueryString(Request.UrlReferrer.Query)["SYSTEM"]
That is c# in vb is is probably something like
HttpUtility.ParseQueryString(Request.UrlReferrer.Query())("SYSTEM")
In VB.NET, one way to get the value of "SYSTEM" from the UrlReferrer is:
HttpUtility.ParseQueryString(Request.UrlReferrer.Query).GetValues("SYSTEM")(0)
Q: I want a regular expression to validate the URL but i wanna to allow this character(~)the Tilda
something like this url:
http://stackoverflow.com/questions/~/
allowing http or without http
thanks in advance
EDIT:
i find a perfect one finally:
(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,#?^=%&:/~\+#]*[\w\-\#?^=%&/~\+#])?
but i wanna to allow the user to enter the url with the protocol or without it to prevent any confusion how to do that.
To allow non-consecutive tildes:
\w+([-+.'~]\w+)*
To allow tildes anywhere:
[\w~]+([-+.'][\w~]+)*
you can try with this one:
\b(https?|ftp|file)://[-A-Z0-9+&##/%?=~_|$!:,.;]*[A-Z0-9+&##/%=~_|$]
if you don't need the HTTP,FTP... youc an take it off like:
\b[-A-Z0-9+&##/%?=~_|$!:,.;]*[A-Z0-9+&##/%=~_|$]
Regards,
HTH.
I'm not sure what do u want. But
\w+([~'\.]\w+)+
Valid for
justname'com
just_name~com
justname.com
Invalid for
justname
just-name-com
If you use
\w+([~]?)\w+\.\w+
Valid for
justname.com
just~name.com
Invalid for
justname'com
just_name~com
just-name-com
There is a very good regular expressions site here where you can get almost any regular expressions. Think this would be useful to you.
can i get validation on weight which can take decimal values and also integer.
suppose if i enter 60 it has to accept and if i enter 60.50 it has to accept (60.1..etc)
but not characters. Thank you.
Use regular expression validator to constrain input.
Positive Decimal: (^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)
How To: Use Regular Expressions to Constrain Input in ASP.NET
you can use compare validator and use type double and operator data type check. it will work for you.
Ok try number two since I misunderstood your question :)
Use a RegularExpressionValidator and use the following expression:
^\d+\.?\d*$
Seems to match any number with as many decimal places as you allow.