ASP NET MVC Area Routing/multiple Routes Issue In VB
Sep 14, 2011
"Multiple types were found that match the controller named 'reviews'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter."
I've recently added a new "Admin" area to my app and within that I have a "ReviewController". There is also a "ReviewController" within the main app folder:
ah - as a new user I can't post an image, but basically I have a "ReviewController" in "Controllers" and in "Areas/Admin/Contollers".
I have 2 routes set up so far:
Default route in Global.asax.vb
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
[Code].....
View 1 Replies
ADVERTISEMENT
Jan 18, 2011
how to integrate bing map in Desktop Application (VB.Net).Is there any option to pull the data from Database from the locations and display the routes for more than one routes?My requirement is I need to show the routes like,
Person A's Route:
Starting point a to b, b to c
Route color: Blue
[code]....
View 5 Replies
Aug 3, 2011
I tried to use ASP.Net's in the following generic handler, but i get this error at Page.RouteData
Reference to a non-shared member requires an object reference
What i am doing wrong?
<%@ WebHandler Language="VB" Class="MainHandler" %>
Imports System
Imports System.Web
Imports System.Xml
[Code]...
View 1 Replies
Sep 29, 2011
I am trying to create a report that will give me the area of multiple polygons on a layer. There will be an unknown number of layers and polygons. I was thinking I could use a multidimensional array with each row holding the layer name and the area of that polygon then loop through and separate the layers and sum the areas. My problem is that in all the reading I�ve done on the subject I�m not sure of how to initialize the array.
View 6 Replies
Jul 21, 2009
I'm trying to set up Route mapping tests using MVC Contrib as described in Test ASP.NET MVC routes using MVC Contrib .The tests compile and execute, but they always fail with the message "The URL did not match any route."I set up another test to try to get an idea of what the problem is:
Public Sub TestIndexRoute()
Dim routes = New RouteCollection
myMvcApp.MvcApplication.RegisterRoutes(routes)[code].....
That test fails on Assert.NotNull(routeData, "routeData is Nothing."), so I know that there must be some problem with the MVCContrib code that is trying to access my app's RouteCollection.From the blog post:It also assumes you set your routes in the ASP.NET MVC RouteCollection object.How do I confirm that I'm doing that? I'm using routes.MapRoute within MvcApplication.RegisterRoutes method in the Global.asax code behind. Is there something else to do to set this up properly?
View 1 Replies
Jun 21, 2011
I have the following controller actions:
<HttpGet()>
Function News() As ActionResult
End Function
<HttpGet()>
Function News(ByVal id As Integer) As ActionResult
End Function
I want it to be smart, and go to the first if I have no ID in the url, and the second if there is. I got the following error:
The current request for action 'News' on controller type 'MarketsController' is ambiguous >between the following action methods:
System.Web.Mvc.ActionResult News() on type TradeChaseMVC.MarketsController
System.Web.Mvc.ActionResult News(Int32) on type TradeChaseMVC.MarketsController
So, I thought if i explicitly created routes without the id parameter optional, like this:
routes.MapRoute( _
"Default2", _
"{controller}/{action}/{id}",
New With {.controller = "Home", .action = "Index"},
New With {.action = "^[a-zA-Z_]+$", .id = "d{1,8}|"}
[Code] .....
It would work, but it doesn't same error. Now I know the simple solution is to call my methods different things, but i don't want to do this. I was also thinking of creating an attribute to prefix the ID method, to check for ID being there, and if it isn't dont allow that method, but I can't get this to work either.
View 2 Replies
Apr 15, 2011
I'm creating an API for a website. I'm using ASP.Net MVC 3 and I'm trying to create routes that support an optional .format parameter. So the client app could request /user/post.json, /user/posts.xml or just /users/posts I was able to make the .json or .xml ending url's work using the following route:
routes.MapRoute( _
"no_params", _
[code]....
But I couldn't make the url without the .format parameter (/user/posts) work alongside.
View 2 Replies
Jul 7, 2010
I have found 4 or 5 examples of "lowercase routes" in C# however when I use the telerik code converter, I get a bunch of errors. Namely something to do with "extension methods can be defined only in modules." how to map routes to lowercase in VB?
[Code]...
View 1 Replies
Nov 24, 2010
My project has the need to build consistent urls similar to the ones here on stackoverflow. I know how I "can" do it by running the string through multiple filters, but I'm wondering if I can do it all with a single method.Basically I want to remove all special characters, and replace them with dashes BUT if there are multiple dashes in a row, I need them to be a single dash. How can I implement this as clean as possible?
[Code]...
View 2 Replies
Jun 11, 2012
Trying to set the viewable area to a smaller screen area and have it cycle through as the person moves using collision detection to move the backgroudn image. Here is the start but its off to a bad start so far.
Public Class Form1
Dim Mapx As Integer = 600
Dim Mapy As Integer = 2000
[code]....
Basically the forum size is set to 600x2000 but the client should only allow you to view 600x600. I want it to add +1 once you "collide with a invisable box I'll add and this will redraw the screen.
View 4 Replies
May 12, 2010
I designed a form and managed to fit graphics inside it. Picture box is 465 pixels high. Form1 is 500 pixels high. SnapShot of the screen verifies that the 500 pixel height is the overal height. It includes the upper Bar and lower frame. Is there an instruction to set the From's inner pixel size and not overal?
View 2 Replies
Apr 9, 2012
What I am trying to do is basically be able to type in to the web address mysite/username and it will redirect them to there page (mysite/Profle/Default.aspx?username=username) according to there username.
View 1 Replies
Dec 20, 2011
I am trying to work with routing on a site I am creating. If I have two routes, /Home/{Value1}/default.aspx for route 1 and /Users/{Value2}/default.aspx for route 2, how do I tell a link I am creating to use a specific route. I am trying to create links in my .vb code behind pages but I am unsure on how to tell it to use either route 1 or route 2 depending on my situation.
View 1 Replies
Dec 8, 2011
I know that you can create routes in asp.net web forms, but how do I go about creating one that handles all my pages like [URL]? I do have a file called page.aspx that will process all the requests for the CMS. I think it's a root handler I need.
View 2 Replies
Sep 18, 2011
In application start of the global.asax i have [code] the strange that is goimg on, is that when i visit the webpage directly~/general/contactus.aspx everything works like a charm, but when i visit the page indirectly ~/en/contact a 404 error is returned!
View 1 Replies
May 11, 2011
I have a website www.abc123.com. What would be the best way to determine when users attempt to access pages like[URL]..I've done some research and found that Request.PathInfo works quite well when the user visits www.abc123.com/Default.aspx/section1 but it does not work without having the Default.aspx portion included in the URL.
Right now all I get are 404 errors when attempting this with the built in IIS server in VS2k8 and on a published website. I'm using ASP.Net 3.5 and IIS 6 if those things matter.
View 2 Replies
Jul 27, 2009
I need to replace my URLs with a more friendly format as the following: Current: [url]
I want it the users to type : [url]
Also, Current: [url]
I want the users to type: [url]
I do not want to use Asp.net MVC.
View 4 Replies
Dec 1, 2011
I have already managed to get friendly urls working with my cms; however, what i want to know is: with asp.net 4.0 routes options, how do i get a root leaving routing? When user types in www.mysite.com/page_name, which is aboutus, it goes to the page cms.aspx but leaves the other routes intact:
[code]...
View 1 Replies
Apr 20, 2011
Is there a way to enable and than configure routing and remote access on windows server 2008 r2 using a (c#,vb).net script? What i need to do is:Enable Routing and Remote access
Configuration:
Select: Virtual Private Network (VPN) and NAT
Choose Network Interface to use based on given IP subnet
Select: Assign IP: Automatic
...and so on.
View 1 Replies
Sep 17, 2010
I'm having a bit of a problem with a loop I made. So the setup is as following:We can create a routing somewhere in the world, from point A to B...and the program draws it on a worldmap.then I open a file with 300 zones in all over that country and he also draws these zones (it can go from polygons to circles. Some of these polygons are really small...when I click on a button I only want to see the zones which are connected to that routing...
So I use following script:
[code]...
this works fine, but not for the very small zones...I think when he uses GetRegionScans from those small intersections...the RectangleF is so small that he thinks it's empty.
View 1 Replies
Jun 7, 2011
I am having an issue where the I am trying to use some Regular Expression in a constraint. The issue is it is evaluating the Regex as a string, and throwing an error. "Cannot convert String 'd+' to long".
.MapPageRoute("Parts",
"{PartName}/{Part}/",
"~/Inventory/Default.aspx",
Nothing,
New RouteValueDictionary(New With
{.Part = "d+"}))
View 1 Replies
Nov 19, 2009
I guess thats what I need to do, Im trying to allow the user to right click on the top of my form, and my custom Context Menu Strip is displayed, not windows context menu strip. I guess somehow i would need to get the size and draw a rectangle on the non client area and see if the user has right clicked in that rectangle? if so how would I get the area of the non client area?
View 7 Replies
May 20, 2009
I have a database application developed around Access with VBA,I have used the Speech SDK and developed an application that in conjunction with MSCOMM 6.0 library calls into a remote IVR system.It sends in the credentials and queries information in response to that IVR's verbal requests. All seems successfull except for one problem;I'm using a shared SR engine and its using the system microphone as its audio input, this in turn gets the sound from the speakers which are routed to the telephone line through the modem. Of course this has a number of disadvantages - noise added to the sound from the environment and sound quality degredation as well as speaker volume dependency.
I would like the SR engine to take its audio input from the modem in paralell with the sound that goes to the speakers (so we can listen in to the call as well). This means that I must route the system audio output to the SR engine audio input. It seems that I must use an InProc SR instance - however in VBA that type is not recognized - since the shared SR uses the microphone as input by default. there is some statement to the effect that it is difficult in Microsoft's Help file. I'm unable to set the SR audio input to the modem output stream in VBA.As needed I can accomplish the C++ interface using an ActiveX object or a DLL to expose the missing API to VBA?
View 7 Replies
Mar 6, 2012
I'm looking for a way to scan a certain area of a PDF or Tif,
and extract the OCR regonizied text which will help me rename these documents I have.
What tools or libaries can I use in .NET to make a quick short program to rename
TIF or PDF files into their appropriate name coming from a portion of text that is on each file.
View 2 Replies
Mar 26, 2010
oksice there is no way to grab an image using its source i was wondering if there is a way to taking a screen pic at a certain x,y coordinates in a webbrowser1 then displaying it in a picture box.
View 3 Replies
Aug 11, 2011
When I add areas to mschart ,chart is printed in smaller size.
View 4 Replies
Mar 1, 2011
In an article in techrepublic about 10 tips to go from a beginner to an intermediate developer
one of the auther's suggestion was "try to become an expert in at least one area of focus" and learn advance idea in depth about that area. With this in my mind I have programmed for about a year mainly for database application in .NET envirnoment (VB/C#), Currently I want to focus or be an expert in at least one area of .NET environmt. As a resutl I had skimmed some area in .NET such as WCF,WPF, ASP.Net MVC ...etc (just reading an overview of different books). My current job . also demand on database programming mainly for desktop application.
So can you suggest me a list of areas of focus in .Net where I can delve on it beside my current job.
I am not sure whether they can be an area of focus I had some ideas such as SOA with WCF
MVC web application Database design and modelling
Edit @sajoshi I have some strength on data modeling and objected oriented design and mainly I like to work in domain modeling and object persistance with ORM tools.I have little interest on UI design.
View 6 Replies
Apr 30, 2011
I have the latest versions of VS 2010, .NET 4.0 and MVC 3 and I have a problem using areas in asp.net mvc 3 when using vb.net.
I do the following:
Create a new visual basic asp.net mvc 3 project. Select Razor as the "View Engin" and call the project "TestApp".
Create a new area called "Test", it will be in the folder: /Areas/Test.
Add a new empty controller called "PageController.vb" in /Areas/Test/Controllers/".
Add a new folder in /Areas/Test/Views/ called "Page".
[Code]...
These are identical with what you get if you repete steps 1-7 and use c# (only difference is that you will get c# code that is equal to above vb.net code).
I repete: If I do the steps 1-7 in C# it works, but it will not work in vb.net!
View 1 Replies
Jun 18, 2012
I would like to use Graphics.FillRectangle or Graphics.Clear with semi-transparent colour (e.g. ARGB=128,0,0,0) to darken entire area of the Graphics object except some specified (rectangular) area:I know this can be achieved with four FillRectangle calls, but I wonder if it cannot be done easier.I am aware of simple clipping (Graphics.SetClip), but this allows me to clip everything outside the specified area and I would like to achieve the opposite.
View 1 Replies
Jun 14, 2009
I have an assignment and I have to calculate the area of a circle. I have my textboxes and buttons but I don't know how to write the codes and I have followed the directions and the example in my book which is microsoft visualbasic 2008 step by step.
View 2 Replies