Watch Pre-recorded Live Shows Here
Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Guest User
Tech Writer
611
70.8k
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