0

I have this controller :

public ActionResult Giris(string KimlikNo)
{
    return RedirectToAction("YeniBelge");
}

I have another controller :

public ActionResult YeniBelge(string KimlikNo)
{
    //do stuff
}

How can I pass KimlikNo's value to YeniBelge controller? Thanks.

1 Answer 1

2

You can pass it using a route value. I assume you mean another method, not another controller

return RedirectToAction("YeniBelge", new { KimlikNo = KimlikNo });

If the methods are in different controllers, then use

return RedirectToAction("YeniBelge", "OtherControllerName", new { KimlikNo = KimlikNo });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.