Ammar
Ammar

Reputation: 1068

Is there is a way to pass in a value for a Razor textbox?

This seems like a simple question but I can't find a good Razor resource that explains how to do this.

I have a simple text box with a value. Let say

<input id="firstname" name="firstname" type="text" value="RE" />

How can I create a textbox like this one in Razor with a default value?

Thanks in advance.

Upvotes: 0

Views: 559

Answers (1)

Jeremy
Jeremy

Reputation: 9020

You can take a look at this SO post: have razor text box default value disappear. There, the poster has provided a glimpse of how he/she provided a value for a textbox.

Another link: Text box default value in Razor syntax.

Shame on you for not looking this up :D

Upvotes: 1

Related Questions