I'm very new to asp and vb.net, I've just learned about regular expression validation but one thing is bugging me: How can I hide my expression from being viewed on my source code?
The plan is to make a very simple 'login' type of page. I know this goes against all that is holy in this kind of operations, but it's just something I'd like to try out.
Also, after the expression has been validated, I want to load another page, I was thinking of achieving this with:
i have this ValidationExpression="(d{1,}.{0,2} .{2,})|(.{2,} d{1,}.{0,2})" used in regularexpression validator. I want to use the same one in a customvalidator. But customvalidator does not have option validationexpression. how can i add this in code or in tag.
I am currently working on a web form where you need to make your own account. One of the required fields is where you need to fill in your postal code. I work with an RegularExpressionValidator. This exists out of 4 numbers. The first number may not be a zero. I know that I need the ValidationExpression (propertie of RegularExpressionValidator) but I don't know what to fill in.
I'm trying to implement a RequiredFieldValidator with a ValidationExpression which is fail validation if the value is -I'm guessing there will probably be a very simple RegEx for it but I am still trying to get my head around it.
I found the answer to this, but it's a bit of a gotcha so I wanted to share it here.
I have a regular expression that validates passwords. They should be 7 to 60 characters with at least one numeric and one alpha character. Pretty standard. I used positive lookaheads (the (?= operator) to implement it:
(?=^.{7,60}$)(?=.*[0-9].*)(?=.*[a-zA-Z].*)
I checked this expression in my unit tests using Regex.IsMatch(), and it worked fine. However, when I use it in a RegularExpressionValidator, it always fails.
Using a RegularExpressionValidator, I want my textbox to accept a max of 20 chars, and only English characters A-Z (upper and lowercase), 0-9, hyphens (-), underscores (_), and spaces. That's it.
Now that I think about it, since this text will be used by a proprietary software to create a file of the same name, and will also be included in the querystring when the page is redirected (so that I can find the file so the user can download it), I'm not sure if I should keep it safe and not accept spaces.
We want to give the calling website 'test' string that links back to the guid of our table which tells the Silverlight application what it's task is when they arrive. We also use this guid for authentication on our application among other things.
I have a URL www.site-address/site-page/page1.aspx?username=deepu&password=deepu how can i change the URL to www.site-address/site-page/page1.aspx?username=232322323232&password=2323232322323 ie i want to encrypt the fields i pass through the URL to encrypt and decrypt the URL in C# using .net,now i am using response.redirect and pass these values as query string...
A folder on File System contains .xml files, .txt files and a file exposed by third party tool. Using c# (in VS 2008), I want to encrypt the whole folder in someway before transferring it through FTP.
I have followed the method in this article, but it has the drawback that is uses reflection on an internal method. This has caused it to be flagged in a code review -- it is not future-proof as the internal implementation may change.
Is there a method with identical functionality which doesn't require using encryption on internal methods?
I am using .NET Framework 3.5 SP1 (Assume I cannot change framework versions)
i am sending pdf attachment mail through the vb.net program .it will go and save in the mail. i want to encrypt and send this pdf. if user open that pdf document trough the it should ask username/password and allow it save local system how to achieve this.
I have a website which has reference to a service layer through which it calls the procedures.I have a web.config file in my service layer.I want to know is that possible to encrypt the database password alone in connection string.if so how it could be done using Enterprise library 5.0.And whether encrypted password should be decrypted before procedure call or it would automatically take decypted value for procedure call.
I am looking into the possibility of shortening / encrypting a url which will be from 150 to 250 characters in length to maximum 12 characters using an algorithm. Initially I am doubting it's possible but I wanted to leverage the great minds of StackOverflow :)
the algorithm should be one that can be written in classic asp, sql, c#, vb, or foxpro or other language.
Is that even possible without a database centric approach?
I was reading here that AES in CFB mode, will do a stream cipher and the output length will be the same as the input length. Is there any way to shorten it even more?
I was wondering how you could encrypt/decrypt your querystring in a simple asp.net page? some values need to be passed between different pages but the querystring cannot be changed or read.
Some say httphandles could be the solution for this.
MORE BACKGROUND INFO:
this is the problem, sometimes the sessions disappear without any reason (well there must be one but I don't know it yet). I've looked into the possible reasons but nothing that could cause it is happening. Therefore I cannot rely on it anymore. The cookie solution is a possibility but it will be more work to implement than simply using the querystring. The url can be copied at any time just not changed!