.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem with "defaultbutton" and IE "TextBox" not writable anymore !

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :ASP.Net

Hi guys !

Something strange happens with my application.

In a form when I hit the "Enter" key it launch the DefaultButton, but when I do it twice then the textboxes are focusable but not writeable anymore.

You can see it live with the link and credentials below :

Launch it with IE, then login and insert two tests values by pressing the "Enter" key. Then the bug happens when you want to insert another test value.

username : test
password : test

View Complete Post

More Related Resource Links

Problem with JavaScript on Textbox

 I have a textbox which is populated by an external javascript file which I cannot alter without affecting another part of the system. What I would like to do is once this textbox has a value to do something with it. The javascript that I want to use is fine, but it won't automatically when a value has populated it i.e. onchange. It will work when the event is onfocus. Is there away in which I can automatically fire off my javascript event when a value has entered the textbox from another piece of javascript code?  

problem with javascript in multiline textbox

 I am setting Maxlength of a textbox using javascript. Take maxlegth as 100.As we know Enter key is taking two char space. But i want to avoid this. i.e. if i press enter key after 96th char it should allow me to enter four more char where now it is allowing only 98. This is wat i am using  function textboxMultilineMaxNumber(txt,maxLen) { try { if(txt.value.length > (maxLen-1)) return false; } } catch(e){ } }

textbox not writable after partial postback of updatepanel

hi, i got a strange problem. my project was ok before implimenting ajax. i have just implimented ajax in one page only with Tabcontainer and updatepanels only nothing else. almost all controls are devided into different Tabs with respective update panels. mostly it is working ok. but the problem is : 1.   in some controls i am not able to write anything even the control is "Enabled=True" and focus is on the same control after partial postback. 2.   and as soon as i press Tab control goes to Address bar. 3.   some time tab key is also not working.Why ? here some code :<td style="width: 57684px; text-align: left">                                                Inception Date (dd-mm-yyyy)</td>                                            <td style="width: 604px; text-align: left">              &n

Problem with overriding OnPaint method of System.Windows.Forms.Textbox

Hi,   I want to change the border colour of the Textbox. However, when I override the OnPaint method, some strange behaviour occurs.   The new border is drawn, as is the textbox background. However, the text itself appears in bold and only while I actually type something in, afterwards it disappears. I have provided a sample of my code here:         protected override void OnPaint(PaintEventArgs e)         {             base.OnPaint(e);             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);             ControlPaint.DrawBorder(e.Graphics, rect, _BorderColour, ButtonBorderStyle.Solid);         }   I have also set the style of the control to Userpaint, so that the paint method is actually used. Does anybody know how to solve this issue?

textbox focus problem


I have a textbox (txtMaiden) and a radio button list (rblGender) in two separate User Controls that I'm using for a registration site. The txtMaiden control appears or disappears depending on whether Male or Female is designated on the radio button. This all works fine but I want the textbox to have focus when it becomes visible. As of now, it only gets focus when the page refreshes. Code follows. Any ideas?

<Prf:gender ID="GenderE" Gender='<%#Bind("Gender")%>' runat="server" />
<Prf:maiden ID="MaidenE" Maiden='<%#Bind("MaidenName")%>' Maiden_Disp='<%#Bind("MaidenName_Disp")%>'
    runat="server" />

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="gender.ascx.vb" Inherits="userControls_profile_gender" %>
<asp:Panel ID="pnlGender" Visible="true" runat="server">
    <div class="label">
        <asp:Label ID="lblGender" Text="Sex:" runat="server" />
    <div class="ctrl">
                <asp:RadioButtonList ID="rblGender" AppendDataBoundItems="True" AutoPostBack="True"

problem in retriving text from a textbox


<asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource1"
Height="132px" style="font-size: medium; font-family: Georgia; color: #006600"
Width="307px" DataKeyField="scrapsndrcod"
<b> <%#Eval("nam") %>:</b>
<%#Eval("scrapmsg") %>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CommandName="rply" >Reply</asp:LinkButton>
&nbsp;<asp:LinkButton ID="LinkButton1" runat="server" CommandName="delete" CommandArgument='<%#Eval("scrapcod") %>'>delete</asp:LinkButton>
<asp:Panel ID="Panel1" runat="server" Visible="false">
<asp:TextBox ID="TextBox1" TextMode="MultiLine" runat="server"></asp:Tex

Textbox WebControl Enabled/Disabled problem: Disabled controls looks great in Firefox but in IE they


Hi everyone,

I don't know if you face the same problem when your page logic has to set the enabled textbox's property to FALSE.  If i use FireFox to browse the page, my disbled controls are show with a dark-silver background color (perfect for me), but when i browse with IE, disabled or enabled textboxes are show the same way (no color differences).

Is there a way to manage controls appearance depending on the Enabled property?

I appreciate your support.


problem finding textbox in gridview


Hi! I need someone's help please. I have a gridview with a template field column. In the edittemplate of that column i have a textbox. In the next column of the gridview i have a button. When i click the button i need to find the value of the before mentioned textbox. I do it like this: gridview1.selectedrow.findcontrol("textbox1"). This sometimes work just fine and without a problem but sometimes it seems it can't find that control and throws a null reference object. The error it's random like i said, sometimes just work and other just don't work...

Sorry for my english.

Thanks in advance.

Textbox and AutoComplete Extender problem


I have a textbox which takes data from autocomplete.

I want to check the textbox text and if the text wasn't taken from autocomplete extender, I want to clear the text.

How can I do this ?


GridView AutoGenerated TextBox Problem!!


Dear All,

I have gridview with auto generated textboxs which are in a row, and those are generated automatically in rowcreated event. Now gridview contains some DATETIME Columns. so i want to insert that datetime column in sql database with other columns in that row. other columns values(ie. Textbox values) are inserted properly but only date field needs conversion as entered date is in DD/MM/YYYY format and sql accepts datetime in MM/DD/YYYY format so can anyone tell me how to check that perticular textbox string value is string so that i can convert it to its required form??

Please Help Guys Urgently!! as my Project is pending for that part only!!

Thanks a lot!!! 

Report Viewer textbox problem


I created a report (Quote Confirmation) in report viewer. I have the customer name, address1, address2, City,State,Zip as textboxes set up. Not all customers have a value in address2. I can hide it but my City field is not moving under my address1 field. Any suggestions?

customer name



City, State Zip




TextBox AutoCompleteCustomSource AddRange problem


I am having trouble filling the AutoCompleteCustomSource using AddRange.

I have a list of items stored in a string array. As I understand it, I should be able to do something similar to

Private Sub FillNames()


Dim fileContents As

Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Highlighting Rows with TextBox OnFocus

In another article I explained that how you can make the rows of the GridView control clickable and highlight them when they are clicked. In this article I will explain that how you can highlight the GridView rows when you focus on the TextBox which is contained inside the GridView control.

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend