You can display the question without an ID but question title has to be unique for every question.
Also you can still use the IDs for finding questions then redirect to another URL that only displays the question title. If that's how you wanna do it I can post an example.
Here's an example:
// this method finds a file from database using the id
//and passes the object with TempData
public ActionResult InitialDetail(int id)
{
var question = questionRepository.GetFile(id);
if (question==null)
return View("NotFound");
else
{
TempData["question"] = question;
return Redirect("/questions/" + question.Name);
}
}
//this method uses model passed from other method and displays it
public ActionResult Details(string questionName)
{
if (TempData["question"] == null)
{
return View("NotFound");
}
else
return View("Details", TempData["question"]);
}
You also have to define a route for this to work
routes.MapRoute("QuestionPage", //Files/id/fileName
"questions/{questionName}",
new { controller = "Questions", action = "Details" } );
Add this route just before the default route. It may mess things if you have routes for URL starting with http://domain.com/questions.
Note: This may not be the best solution. If your question titles are not unique, you can't put links with this structure in your page. First it has to look for question using ID.