DropDownList how can add

Harun Ergün 260 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

Developer technologies | ASP.NET | Other
SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Lan Huang-MSFT 30,206 Reputation points Microsoft External Staff
    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

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.