Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Special Characters in EditItemTemplate does not allow update

$
0
0

I am working on an Asp.net project.

There is a datagrid to which a datasource is bound. One of the rows contains the "less than" sign "<". In hte aspx page, I use something like : 

 <asp:TemplateField HeaderText="Password">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txtPasswordEdit" runat="server"
                                                        Text='<%# HttpUtility.HtmlDecode(Eval("Password"))  %>'   ></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:TextBox ID="txtPasswordNew" runat="server"
                                                        Text='<%# Eval("Password") %>'></asp:TextBox>
                                                    </FooterTemplate>
                                                    <ItemTemplate>
                                                       <asp:Literal ID="lblPassword" runat="server"
                                                        Text='<%# HttpUtility.HtmlEncode(Eval("Password")) %>'></asp:Literal>
                                                    </ItemTemplate>
                                                    <FooterStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>

I have set the page validaterequest to false.

When i hit the edit button, the grid goes into edit mode. however, hitting cancel does not do anything once the grid is in edit mode. 

Please help


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>