TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
611
128.1k
Routing in .net core.
Mar 2 2021 10:17 AM
I have set default routing in razor this my code. But it's not working
services.AddMvc().AddRazorPagesOptions(options =>
{
options.Conventions.AddPageRoute(
"/PageTemplates/_Home"
,
""
);
});
}
public
void
Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if
(!env.IsDevelopment())
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseCofoundry();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
By default Error.cshtml page run i want to run home page .Please help me
Reply
Answers (
3
)
how to check the label.text contains the path string or not ?
Web Base Solar Tool