Rohit
Rohit

Reputation: 10296

How to resize textboxarea in MVC 2

I am very new to MVC and I am trying to automatically resize my textbox area in MVC2 which receives data from controller

I have tried

  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery /1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="../../Content/jquery.autoresize.js">
    $(document).ready(function () {
        $("#target").autoResize();
    });
</script>

  <%: Html.TextAreaFor(model => model.QDetail, new { @id="target" }) %>

But it doesnt work...

Thank you All

Upvotes: 0

Views: 79

Answers (1)

SpiderCode
SpiderCode

Reputation: 10122

Try to use autoresize as mentioned below :

<script type="text/javascript">
    $(document).ready(function () {
        $("#target").autoResize();
    });
</script>

Upvotes: 1

Related Questions