2011-02-22 49 views
0

我有一个包含TextArea的部分视图。 当我在我的主视图页面中呈现这个视图时,文本区域将被禁用(但不会变灰),并且不允许在其中键入任何条目。部分视图使用ASP.NET MVC 2.0进行渲染

//---Here are the code segement from my partial view--- 

<div id="AddComment" style="display:none"> 
     <fieldset> 
      <legend>Add Comment</legend> 
      <p><label> Comment for:</label>- <select id="Station"></select></p> 
      **<%=Html.TextArea("UserComment", new { rows = 5, cols = 65})%>**** (this text area is the problem) 
      <p><input type="button" id="addComment" onclick="SaveComment()" value="Save" /></p> 
     </fieldset> 
</div> 
//-----end of code segment ----------------------- 

请帮

在此先感谢。

+0

你有任何JavaScript是禁用textarea? – Jimmy 2011-02-22 19:17:20

回答

0

我已经解决了问题。它不是局部视图渲染的错误。它基本上是写在主页面上的脚本来阻止退格按键。

// -------------------- //下面的代码行阻止浏览器在编辑器外部提示退格键--- // //文档.attachEvent('onkeydown',function(evt){evt.returnValue = false;}); // ------------------------------------------------ ----------------------------------- // ...

一旦我删除了这条线的东西开始工作。感谢大家帮助我