how can add ?

Harun Ergün 260 Reputation points
2023-05-16T13:12:56.6333333+00:00

Deneme.cshtml(DropDownlist)

Create.cshtml(MAIN Veaw)

I want to insert Deneme into Create

how can add ?

Developer technologies | ASP.NET | 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-17T09:35:50.88+00:00

    Hi @Harun Ergün,

    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.


1 additional answer

Sort by: Most helpful
  1. davidjohnson 5 Reputation points
    2023-05-16T13:25:10.1+00:00

    To add a DropDownList from the "Deneme.cshtml" view into the "Create.cshtml" main view, you can follow these steps:

    Open the "Deneme.cshtml" file and locate the DropDownList code. Copy the relevant code block.

    Switch to the "Create.cshtml" file and navigate to the desired location where you want to insert the DropDownList.

    Paste the copied DropDownList code into the appropriate place in the "Create.cshtml" file.

    Save the changes to both files.

    By adding the DropDownList code from "Deneme.cshtml" into "Create.cshtml", you can incorporate the DropDownList functionality into the main view.

    Regards;

    CEO

    Mobilesinbd


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.