|
HI Sir,
please check this url asp.net mvc 4 - Using Url.RouteUrl() with Route Names in an Area - Stack Overflow[^]
in the above url you will see a example where two controller name has been mentioned.
here a small snippet.
context.MapRoute(
"UserHome",
"User/{id}",
new { action = "Index", controller = "Home", area = "User", id = 0,
httproute = true },
new { controller = @"Home", id = @"\d+" }
);
looking for your further guidance. thanks
|
|
|
|
|
That doesn't match the code in your question.
This code is calling the MapRoute(name, url, defaults, constraints)[^] overload. The second anonymous object represents the constrains on the route.
See: ASP.NET Routing: Adding Constraints to Routes[^]
It would probably be worth reading most of that article. (You can ignore the "Web Forms" section.)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
sir can you give some direction that which area i need to fix in my code.
|
|
|
|
|
What code? You've shown two different code blocks, one of which won't compile. And you haven't described a problem that needs fixing with either one.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
thanks sir for reply.
i found the small definition and it is
Kubernetes is an open-source system for automating deployment, scaling and management of containerized applications that was originally designed by Google and donated to the Cloud Native Computing Foundation
but the image i posted it seems it is application health check apps....isn't ?
|
|
|
|
|
No,
Mou_kol wrote: Kubernetes is an open-source system for automating deployment ... If you want to know more then please go to the Kubernetes website and read the documentation.
|
|
|
|
|
Hi guys!
I am thinking of creating a payment getway like Payoneer to help my country, we are deprived of VISA cards. And the goal is to use our own currency to make local purchases.
Please help me guys.
Thank you! 
|
|
|
|
|
Please do not post in multiple places: it duplicates work and that annoys people.
You already have this in QA, so leave it there.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
My routing code is not working.
i am showing data in tabular format with sorting and pagination. my solution is working. when i hover mouse on column then url looks like
http://localhost:55831/Customers?page=2&SortColumn=CompanyName&CurrentSort=ContactName
when i click on pagination numeric link then url looks like
http://localhost:55831/Customers?page=3&SortColumn=ContactName
i want my url should look like
1) http://localhost:55831/Customers/2/CompanyName/ContactName
2) http://localhost:55831/Customers/3/ContactName
so i add one routing code. here it is
routes.MapRoute(
name: null,
url: "Customers/{page}/{SortColumn}/{CurrentSort}",
defaults: new
{
action = "Index",
page = UrlParameter.Optional,
SortColumn = UrlParameter.Optional,
CurrentSort = UrlParameter.Optional
}
);
after adding the above routing code url looks bit weird. now url looks like
http:
http:
so when i click on above links then i am not redirecting to proper controller and action rather getting error.
so it means there is some problem in code which i added as routing in route.config.cs file.
my full routing code
routes.MapRoute(
name: null,
url: "{controller}/{action}/{page}/{SortColumn}/{CurrentSort}",
defaults: new
{
action = "Index",
page = UrlParameter.Optional,
SortColumn = UrlParameter.Optional,
CurrentSort = UrlParameter.Optional
}
);
routes.MapRoute(
name: null,
url: "{controller}/{action}/{page}/{id}",
defaults: new
{
controller = "Home",
action = "Index",
id = UrlParameter.Optional,
page = UrlParameter.Optional,
}
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
so please help me to get my desired url what i mention above. thanks
modified 2-Feb-18 5:25am.
|
|
|
|
|
Controller
public class CustomersController : Controller
{
public ActionResult Index(int page, string SortColumn, string CurrentSort)
{
return View();
}
}
route
routes.MapRoute(
name: "Customers",
url: "Customers/{page}/{SortColumn}/{CurrentSort}",
defaults: new
{
controller = "Customers",
action = "Index",
page = UrlParameter.Optional,
SortColumn = UrlParameter.Optional,
CurrentSort = UrlParameter.Optional,
}
);
razor markup
@Html.RouteLink("Click", "Customers", new { page = 1, SortColumn="CompanyName", CurrentSort="ContactName" })
@Html.RouteLink("Click", "Customers", new { page = 1, SortColumn = "CompanyName" })
|
|
|
|
|
sir please advise me how to use action link instead of routelink. i am using pagelist for pagination link...where i can not use routelink. i guess pagelist work with actionlink.
please suggest something. thanks
|
|
|
|
|
i am new to .net.please guide me. Thank You....
|
|
|
|
|
|
few questions about local db and sql express db.
1) i found many time a db with .mdf extension in app_data folder. that db is local db or sql express db?
2) is there any process which help me to determine that db type in app_data folder ?
3) what is the difference between local db and sql express db? or both is same ?
4) what is sql compact db and how it is different from local db and sql express db?
please answer point wise. thanks
|
|
|
|
|
The type of files stored in that folder depend on the application - i.e. it's up to the app developer to store whatever they want there - it may be an Access file, an SQLite file, or maybe just an XML or JSON file. You can usually tell by the file extension what sort it is.
|
|
|
|
|
i found no css section. so i place a Bootstrap related question in asp.net section.
i want to show X icon on textbox to clear textbox control's data. i tried this but not working properly.
X icon is not getting placed on textbox rather it is coming after textbox which is not right. so tell me what i am missing in code.
<div class="btn-group has-feedback has-clear">
<input id="searchinput" type="search" class="form-control" style="width:200px;">
<a
id="searchclear"
class="glyphicon glyphicon-remove-circle form-control-feedback form-control-clear"
style="pointer-events:auto; text-decoration:none; cursor:pointer;"
onclick="$(this).prev('input').val('');return false;">
</a>
</div>
jsfiddle link https://jsfiddle.net/DTcHh/42173/
|
|
|
|
|
You've linked to Bootstrap v3.0.0, which didn't include the has-feedback classes.
Update your links to v3.3.7, and your code will work.
Bootstrap 3 Template - JSFiddle[^]
FYI: for HTML and CSS issues that don't directly relate to ASP.NET, the Web Development[^] forum would be more appropriate.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Odd.... your JSFiddle works in every browser (incl Edge) except IE11. All the frames are blank in IE. I've never had an issue with JSFiddle in IE before ...
|
|
|
|
|
Looks like they've dropped or broken support for IE11 - there's a Javascript error from their editor code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Update: It wasn't intentional, and they're going to fix it.
Twitter[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
thanks you so much to drive me to right direction. thanks
|
|
|
|
|
one last question that i want the X sign should appear when user start writing in textbox....so tell me what i need to change in code. thanks
|
|
|
|