I have to refactor really huge project with a lot of user controls where each has a lot of element sometimes with no unique id. I mean that in one page Image element has ID="img" as well as DevExpress popup control (containig image) in another page. When I try to search concrete ID, I found many of them in code behind files (.cs) but I need only these which I can find in *.ascx files. Can I do such thing?
I have Visual Studio 2005 and 2008 installed on my machine. When I bring up the Find and Replace box in 2008 in any project the 'Look at these file types:' option is blank however in 2005 it keeps defaulting to the file type of RemoveFile. If I don't remember to clear it then it causes my search to fail. Does any one know how do I reset this value or remove this default option so the file type is not set and it looks at every file type when I search for a word.
I'm using the Google Places API to discover information on a restaurant. [URL] ....
I need my name parameter to contain an & because I am looking for D'Agostino's Pizza & Pub. But I am not sure what my URL needs to look like, because my requests are returning no matches. I am trying:
maps.googleapis.com/maps/api/place/nearbysearch/json?location=41.8957646,-87.6553512&radius=5000&types=restaurant|food&name=D'Agostino's Pizza %26 Pub&key=<mykey>. But is that even right?
I believe the search should return results, because in google if you type "D'Agostino's restaurant north ogden avenue Chicago IL", it's a perfect match there.
I'm using the web.config transformations on an ASP.NET site so I have .config settings for dev, test, and release environments. I need to run the source code in Visual Studio against the test database using the settings in Web.Test.config and I can't figure out how to do it. I tried changing the configuration to Test but it still uses the base Web.config settings.
I am using Windows 7 + VS 2010 and I need to access (debug purpose) my web project in VS but through HTTP-access from outside my router's network. I have mapped localhost to e.g. port 80 and my local PC has IP 192.168.1.2. Now, how can I map the VS project to the local IP?
Also the file: C:WindowsSystem32driversetchosts says:
# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost
Tried to reasign localhost there but W7 refused to make changes even though I am admin.
A typical CSS property that I use often is overflow-x and overflow-y. Sometimes I use CSS 2.1 or later properties or selectors. These (correctly) raise a validation error: Validation (CSS 2.0): 'overflow-y' is not a known CSS property name.For years I ignored this, but it kinda feels wrong. It's possible to switch off warning in C# and other languages for a particular line, block, file or project. Is something similar possible for CSS (or HTML) errors or warnings? Instead of switching it all off, I prefer a more granular solution.
Using Visual Web Developer I have created a page (Search.aspx) with a Text Box(SourcingIC) and Search Button. I do not want data (Gridview) displayed on the Search.aspx page, just the Text Box and Search Button.
A user inserts name in the text box(SourcingIC), presses the search button and then is directed to a new page (SearchResults.aspx) that displays the records found for SourcingIC. What coding is needed to make this happen? Can you provide me with what actual coding would need to be added?
I am new at this VB/Microsoft Visual Web Developer 2010 Express thing. I am amaze that I even got this far and thatI manages to make this search page work. Below is the code and picture for this search page. It's working. However I want to transfer the result/the gridview onto a second page Result.aspx. But I tries all kind of thing and it just doesn't seem to want to cooperate with me. If anyone can give me some hint/some sample codes on how I might be able to transfer controlfrom one page onto another. I just have to learn it from a class extra credit project. Also in the picture above I am using a direct connection to an Access database not the ObjectDataSource. I was just playing around with it to see which is better. But I ended up going with direct connection to Access database.
<%@ Page Language="VB" ClassName="SenderClass" EnableSessionState="True" %> <head> <script runat="server"> Sub closeSite(ByVal sender As Object, ByVal e As EventArgs) Response.Write(" <script language='javascript'> { window.close(); }") End Sub Sub Page_Transfer(ByVal sender As Object, ByVal e As EventArgs) 'Storing in Context Session("SearchBox") = SearchBox.Text Session("ListBox") = ListBox1.Text Session("DropDownList") = DropDownList.DataTextFormatString 'Context.Items("DropDownList") = DropDownList.Text 'Server.Transfer("SearchResult.aspx") End Sub Sub Page_Transfer2(ByVal sender As Object, ByVal e As EventArgs) Dim field1 As String = ("SearchBox") Dim field2 As String = ("ListBox") Dim field3 As String = ("DropDownList") 'Dim TestString As String = ("SELECT * FROM [Books] WHERE (([Title] = ?) AND ([Category] = ?))") End Sub Sub Test(ByVal sender As Object, ByVal e As EventArgs) AccessDataSource1.SelectCommand = "SELECT * FROM BOOKS WHERE " If DropDownList.SelectedIndex = 0 Then AccessDataSource1.SelectCommand += String.Format(" ((Category = @Category OR 'Computer' ") AccessDataSource1.SelectCommand += String.Format(" OR 'Literature & Fiction' OR 'Reference'") AccessDataSource1.SelectCommand += String.Format(" OR 'Romance' OR 'Science'") AccessDataSource1.SelectCommand += String.Format(" OR 'Home Design' OR 'Accounting & Finance'") AccessDataSource1.SelectCommand += String.Format(" OR 'Horror' OR 'Refernce'))") Else AccessDataSource1.SelectCommand += String.Format("(( Category = @Category ))") End If For Each Item As ListItem In ListBox1.Items If Item.Selected = 0 Then AccessDataSource1.SelectCommand += String.Format(" AND ((Title Like @Search + '%'", Item.Text) AccessDataSource1.SelectCommand += String.Format(" OR [Author(s)] Like @Search + '%'", Item.Text) AccessDataSource1.SelectCommand += String.Format(" OR Publisher Like @Search + '%'", Item.Text) AccessDataSource1.SelectCommand += String.Format(" OR ISBN Like @Search + '%'", Item.Text) AccessDataSource1.SelectCommand += String.Format(" OR Price Like @Search + '%'", Item.Text) AccessDataSource1.SelectCommand += String.Format(" OR Category Like @Search + '%'", Item.Text) AccessDataSource1.SelectCommand += String.Format(" OR Year Like @Search + '%' ))", Item.Text) End If If Item.Selected = 1 Then AccessDataSource1.SelectCommand += String.Format(" AND (Title Like @Search + '%' )", Item.Text) End If If Item.Selected = 2 Then AccessDataSource1.SelectCommand += String.Format(" AND ([Author(s)] Like @Search + '%' )", Item.Text) End If If Item.Selected = 3 Then AccessDataSource1.SelectCommand += String.Format(" AND (Publisher Like @Search + '%' )", Item.Text) End If If Item.Selected = 4 Then AccessDataSource1.SelectCommand += String.Format(" AND (ISBN Like @Search + '%' )", Item.Text) End If If Item.Selected = 5 Then AccessDataSource1.SelectCommand += String.Format(" AND (Price Like @Search + '%' )", Item.Text) End If If Item.Selected = 6 Then AccessDataSource1.SelectCommand += String.Format(" AND (Category Like @Search + '%' )", Item.Text) End If If Item.Selected = 7 Then AccessDataSource1.SelectCommand += String.Format(" AND (Year Like @Search + '%' )", Item.Text) End If Next Dim KeywordCom As String = AccessDataSource1.SelectCommand.ToString Context.Items("Test") = KeywordCom.ToString Server.Transfer("Result.aspx") End Sub </script> </head> <html> <body> <a href="Default.aspx">Home</a> <a href="About.aspx">About.aspx</a><a href="SearchResult.aspx">SearchResult.aspx</a> <form id="form1" runat="server"> <h3> Search for: <asp:TextBox ID="SearchBox" runat="server" Width="219px" /> <asp:Button ID="Button1" Text="Search" Width="146px" AccessKey="S" runat="server" Enabled="True" Onclick="Test" height="26px" style="position: relative"/> </h3> <h3> Search In:<asp:ListBox ID="ListBox1" runat="server" style="margin-left: 6px" Width="221px"> <asp:ListItem>Keyword Anywhere</asp:ListItem> <asp:ListItem>Title</asp:ListItem> <asp:ListItem>Author(s)</asp:ListItem> <asp:ListItem>Publisher</asp:ListItem> <asp:ListItem>ISBN</asp:ListItem> <asp:ListItem>Price</asp:ListItem> <asp:ListItem>Category</asp:ListItem> <asp:ListItem>Year</asp:ListItem> </asp:ListBox> </h3> <h3> Category: <asp:DropDownList ID="DropDownList" runat="server" Height="16px" Width="162px"> <asp:ListItem>All Categories</asp:ListItem> <asp:ListItem>Computer</asp:ListItem> <asp:ListItem>Literature & Fiction</asp:ListItem> <asp:ListItem>Reference</asp:ListItem> <asp:ListItem>Romance</asp:ListItem> <asp:ListItem>Science</asp:ListItem> <asp:ListItem>Home Design</asp:ListItem> <asp:ListItem>Accounting & Finance</asp:ListItem> <asp:ListItem>Horror</asp:ListItem> </asp:DropDownList> <asp:Button ID="Button3" runat="server" Text="Exit Store" Width="146px" height="26px" /> </h3> <p> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="AccessDataSource1" > <Columns> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" /> <asp:BoundField DataField="ISBN" HeaderText="ISBN" SortExpression="ISBN" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:BoundField DataField="Author(s)" HeaderText="Author(s)" SortExpression="Author(s)" /> <asp:BoundField DataField="Publisher" HeaderText="Publisher" SortExpression="Publisher" /> <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" /> <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" /> <asp:BoundField DataField="Category" HeaderText="Category" SortExpression="Category" /> <asp:ButtonField ButtonType="Button" CommandName="Select" HeaderText="Select" ShowHeader="True" Text="Select" runat="server" /> </Columns> </asp:GridView> <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Books.accdb" > <SelectParameters> <asp:ControlParameter Name="Category" ControlID="DropDownList" PropertyName="SelectedValue" /> <asp:ControlParameter Name="Search" ControlID="SearchBox" PropertyName="Text" /> <asp:ControlParameter Name="InColumn" ControlID="ListBox1" PropertyName="SelectedValue" /> </SelectParameters> </asp:AccessDataSource> </p> <p> </p> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </form> </body> </html>
I need to open a txt text an search a sequence data. For example, searching for "name" and get the text NAME: John Doe and return only the "John Doe". An example of the contents of the text:
NAME: EDUARDO MANCIA AGE: 27 ADDRESS: Rua Altino Arantes NUMBER: 297 CITY: SAO PAULO NAME: CARLOS ABREU AGE: 32 ADDRESS: RUA SAO JOSE NUMBER: 1002 CITY: SAO PAULO
There is no standard type of a "name" per line, in fact everything is amended and the file is quite extensive, with 1687 contacts.
When i SEARCH for a particular topic including code examples for example, SQLDATASOURCE.INSERTPARAMETER the search results come up nothing?In VSDE 2005 version various result examples are display.
The only help content appears to be menu on feature walkthroughs much like in Windows?
I want to know how can I build a simple search engine which search from specific websites, for example it should search codeplex and msdn only and show the result on my page?
This is one thing that's long driven me nuts. Sometimes I want to search the entire project for some string, and about a billion matches occur in JavaScript files, making the search unusable. Is there a way to specify file types to include in the search?
I'm trying to access an SQL Server Express database out of an ASP.NET HTTP request handler. The handler is run under ASPNET account and uses "integrated security" in the SQL connection string and so I get an error message saying that login for ASPNET account failed and so I can't access the database. This seems to be a very common problem and most answers say "grant access to you database to user ASPNET".
I only have Visual Studio 2008 and I can't find how to change access permisssions for a database. Specifically I use Tools->Server Explorer and I can see all the tables in the database but can't find how to change access permissions. How do I change access permissions to my database using tools shipped within Visual Studio 2008?
I basically want to do a reverse 'search in all files', so it returns files that don't contain "keyword".Does anyone know how to do this, or the regex used, etc?
I want to use a source control in VS2010, I know my best bet is TFS, but at the moment TFS(can't afford ). As i understand TFS is the new VSS_2005(can afford)Can VSS 2005 be use as a source control for VS 2010 solutions/projects?
I just recently upgrade my asp.net web project from visual studio 2005 to visual studio 2010. The upgrade was successful with no problems however im missing some features with this project. The One Click Publish feature(which is greyed out) in the header area of Visual Studio 2010 and the Add Config Transforms feature which is no where to be seen when you right click on web.config. When i create a new web project straight from visual studio 2010, these options work fine.
Visual Studio 2010 Beta 2 locked up, and when I tried to restart it, it wouldn't load, so I did a devenv.exe /resetuserdata to get it going again. It reset everyhing in my options of the web app/ etc, and now some AJAX conrols don't work such as dragpanel. I assume that it is because something got reset that I haven't enabled again, but can't figure it out.