DropDownList how can add

Harun Ergün 220 Reputation points
2023-05-17T09:06:38.79+00:00

Guys I have simple question.

I want add DropDownlist(Connection SQL 2 table province and district) view. I success. But I have 2 cshtml page.

Create.cshtml Main page

Deneme.cshtml DropDownList page

My question how can add DropDownList My main page ?

User's image

MAİN PAGE ;

User's image

User's image

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,490 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,867 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
856 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lan Huang-MSFT 15,296 Reputation points Microsoft Vendor
    2023-05-18T02:04:53.6466667+00:00

    Hi @Harun Ergün,

    According to my understanding, your post and your previous post want to achieve the same function: insert Deneme into Create.

    https://learn.microsoft.com/en-us/answers/questions/1285986/how-can-add

    You can try to use Html.RenderAction implementation.Invokes the specified child action method and renders the result inline in the parent view.

    Use the code below in Create.cshtml.

    @{Html.RenderAction("Deneme");}
    

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful