I have a project in asp.net web form and I want to search all files which contains "~/Products" with ctrl+shift+f but I want to exclude a file which is Server.Transfer("~/Products"). I tried regex but it did not work. How Can I do this with regex or something else?
I tried
*~/Products*;!*Server.Transfer("~/Products")*;
If you want to search all files which contains "~/Products" and exclude a file which is Server.Transfer("~/Products").
You can try this regex:
^((?!Server\.Transfer).)*~/Products((?!Server\.Transfer).)*$
Related
I have an aspnet webform application and I have more than 1000 server.transfer like below
Server.Transfer("~/General/Personnel/List.aspx");
I want to add /V2 after "~" in all files.
Expected is
Server.Transfer("~/V2/General/Personnel/List.aspx");
This is only sample so I have different folder structure like General/Users/Personnel, Customer/Personnel, Users/List/Personnel only /Personnel is common for every server transfer I want to add /V2 after "~" in all files which contains "/Personnel". How Can I do this with regex or another else in visual studio.
If you want to add “/V2” before all files containing /Personnel, you can try this regex to replace them.
You can click Ctrl+Shift+F to open this window and replace ~/(.*)/Personnel into ~/V2/$1/Personnel
Is there away to search for files using wildcard with the Fuzzy Find Files in Atom (cmd-t cmd-p)
e.g.
*query.js
shows
jquery.js
Press Ctrl+Fand then Ctrl+Alt+/ for regex search
https://discuss.atom.io/t/search-wildcards-for-find-replace/16928
the key cmd-b will make a wildcard search
What is the syntax of the Locations field in the Find and Replace pane of LightTable? (which appears when hitting CTRL-SHIFT-F, or CTRL+SPACE then Searcher: show)
I would like to exclude all files of the docs/ subfolder, as well as all *.txt and *.csv files of my workspace. What should I enter in the Locations field to exclude them from a search & replace?
Or inversely, I'd like to include only the files from the src/ subfolder. How would I accomplish that?
There doesn't seem to be a way to exclude directories or file patterns right now. However, you can specify which directories to include. You will have to write the whole path though (relative paths use Light Table's application directory). If you want to have more than one path you can separate them by using a comma:
/absolute/path/to/first/dir, /absolute/path/to/second/dir
I have a project with 3 subprojects:AdminPages, UserPags ,UIpages,each part has a separate files.for example AdminPages is coded by MVC4, Userpages and Uipages is coded by ASP web form .
So i have 2 config files,my question is can i combine these two files into single file?Or i have to put each project in a special subdomain ?
Thanks.If i can i will add config files to this post.
With a little google, I came to an answer where it was stated that you can use: XmlConfigMerge.
A qoute from the site:
The XmlConfigMerge utility (provided both as a library assembly and as a console application) supports this merging of XML .config files, and also supports setting of specific parameters via XPath filtering and optional Regex pattern matching.
Go there and try their code and documentation. Good luck!
In my project I want to rename the file before it is updating. For example a file in my system like Mycontact.xls. I want to rename it as sasi.xls (it is an excel file). How can I write the code in ASP.NET?
Actually I am using a fileupload control to get the file in and rename the file and upload the renamed file in a folder which is in Solution Explorer.
You can do it with the File.Move method eg:
string oldFileName = "MyOldFile.txt";
string newFileName = "MyNewFile.txt";
File.Move(oldFileName, newFileName);
C# does not provide a file rename function, unfortunately. Anyhow, the idea is to do this:
File.Copy(oldFileName, NewFileName);
File.Delete(oldFileName);
You can also use - File.Move.
Be aware that when that code executes, the owner of the file will turn into the identity you have set on your Application Pool on which the website is running.
That account might not have enough permissions to 'create new' or 'delete' files.
I would advise you to place all read/writable files in a seperate location so you can control the security settings seperately on that part. This will also split off the 'only readable files/executables' (like the aspx and such) from the 'read/writable' files.