.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 tabbing among text boxes with AJAX

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
We are having a problem with a form with four text boxes. If you enter a value in the first two boxes, pressing TAB as you switch between the text boxes, the data is retained in the text box as you would expect.  However, the third and fourth text boxes won't retain any data.  This happens in IE 8 but not FireFox 3.5.  The problem won't occur if you use the mouse to switch between text boxes. The problem goes away if we remove the AJAX code, but we want to retain the AJAX code so that some other things happen without postbacks.  I can upload a sample website if that will help, but I don't see where I can upload the files. We're using Visual Studio 2010 and VB.NET in an ASP.NET project.   Protected ToolkitScriptManager1.SetFocus(TextBox2)     Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChangedEnd Sub   ToolkitScriptManager1.SetFocus(TextBox3)     Protected Sub TextBox2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.TextChangedEnd Sub   ToolkitScriptManager1.SetFocus(TextBox4)      Protected Sub TextBox3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.TextChangedEnd Sub  

View Complete Post

More Related Resource Links

Dynamic Text Boxes Creation Problem

Hi all, I am creating 5 textboxes in a row. A new creates when user press enter in the last textbox. I have taken a hidden text field and in OnKeyDown of last textbox I am assigning the combination of last textbox Id with the table count  to the hidden field and in VB Code I am checking whether the tableCount + Last textbox Id is equal to the hidden field or not then only I am generating the new row. here is the code In JavaScript On KeyDown of remarks textfield. function funcNewRow(id,count,e) {    var e = event || evt;    var charCode = e.which || e.keyCode;    if(charCode == 13){      e = cancelKey(e);      htxtBox.value = id + count;    } }   In VB Page_load method calling getTableRow() method   if htxtBox.value = "remarks" & (Tbl.Rows.Count + ViewState("TotalClearedItems")) Then  Tbl.Rows.Add(GetTableRow(Tbl.Rows.Count + 1 + ViewState(Panel1.Controls.Add(Tbl))  Panel1.Controls.add(Tbl) htxtBox.Value = "" end if   Here I have to implement a clear functionality such as each row at last contains a check box when user click the check box and press clear button the checked rows have to deleted .   The clear button code as follows : cnt = CInt(Tbl.Rows.Count)  For i = cnt To 1 Step -1 c = Pag

Embed Youtube inside Ajax Html Editor- problem



When inserting a simple embed of youtube inside the ajax editor, on firefox and chrome problems occur. On the other hand on internet explorer 8 everything works fine. I found this solution http://www.nopcommerce.com/boards/t/4228/bug-in-ajax-html-editor.aspx . 

My question is where do I find the DesignPanel.pre.js ?


Roderick Vella

Cutting Edge: Modal Dialog Boxes with AJAX


This month Dino Esposito shows you how to get Windows-style modal dialog boxes for your Web applications thanks to the Ajax Control Toolkit and some clever coding.

Dino Esposito

MSDN Magazine Launch 2008

text posing problem in different resolution


Hiiiii coders ,

iam using 14px for my font size in my project . It works fine when i run it on my system. But when i tried to run it on higher resolution the all the text gets shrinked . what is the best way to set font size for my text for all resolutions?

kindly provide me some code snippets.

thanx and regards 

Crystal Reports can grow fields with large amounts of text layout problem


A can grow field in the details section of a crystal report may have so much text that the section will be larger than the remaining space available on the page (the space below the previous record).  The section has vertical lines on it with Extend to bottom of section when printing set to true.  The section starts on a new page (and may continue on the following one).  I want it to start on the page where the last record was laid out, and continue to the new page without leaving a gap with vertical lines on it.  I'm using Crystal Reports 9 and I can't work out how to do it. Has anyone got a solution?

Validate mutually exclusive text boxes


Meaning only one of them can have a value, but not both.

I suspect one validation control can't handle both.


Any ideas? 

AJAX rating control on DataRepeater problem



 I am using a DataRepeater control to display records from a database. I have placed an AJAX rating control in the repeater. The control works fine for the first record in the data repeater but it does not work for the rest of the records. The problem is that the control renders fine on the screen but I cannot click it - the mouse changes when hovering over it, but the control does nothing, not even when I click it. The first item works ok though. Any ideas what could be the problem?

 Thanks a lot

Problem with AJAX control toolkit


Hi guys

i'm newbie to AJAX usage.

i'm using visual web developer 2008 express edition

i downloaded AjaxControlToolkit.Binary.NET35 from codeplex site.

i extracted the zip file.

I added the toolbox to visual web developer by adding a new tab naming it ajax kit.

added tools to it by choose item and selected AjaxControlToolkit.dll ,the one i unzipped.

AJAX tools appear in toolbox.Even after using script manager tool,when i drag one of the contols for example autocompleteextender,i get a circle with black diagonal line indicating i cant use the tool

Why is it so..

when i hard code the the controls in tags in source tab ,i dont get an error but i dont get the tool in design view...

the following lines are also present

<%@ Register assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

Can anyone plz help me...

It's urgent

Thank u

Ajax Control Toolkit problem

I have been trying over a week to make ModalPopup work. Still can't understand how to do it. Can somebody help me? Actually, I didn't find a way to use ANYTHING from the Ajax Control Toolkit.I want to put a ModalPopup with the Toolkit 4 in the Log In of this file:<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebApplication1.SiteMaster" %> <%@ Register      Assembly="AjaxControlToolkit"      Namespace="AjaxControlToolkit"      TagPrefix="ajaxToolkit" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head id="Head1" runat="server">     <title></title>     <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />     <asp:ContentPlaceHolder ID="HeadContent" runat="server">     </asp:ContentPlaceHolder>     <script runat="server"> </script> </head> <body>     <form id="Form1"

simple wfc and ajax problem

Good day,I wrote a very basic hello world wfc/ajax solution.C#public string sayHello(string name)    {        return "Hello " + name;    }JS:function go() {            tempuri.org.IService.sayHello("John", OnSuccess());        }        function OnSuccess(r) {            document.getElementById("result").innerHTML = r;        }All the plumbing is pretty much what all the dev sites say...but I am getting a curious result.If I put a break in OnSuccess and in sayHello functions. The onSuccess is hit before the sayHello - both are hit though so the wfc seems to be working its just that the onSuccess is being called straight away rather than after the return from the server.Help appreciatedKalCODE:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">

Problem with Ajax calendar extender visibility

sir i am using ajax calender extender in textbox below this textbox i am using a panel there is a gridview that show data.problem is when i click the textbox half of the calender id hiden behind the panel how to solve this problem. 

Ajax problem with IIS

I'm having a problem with a AJAX call that works against the VS development server but not against IIS. The culprit is the .post statement in the function below. The function is called when a button is clicked. The index action is not called when run against IIS. From what I read I'm 99% sure it has to do with the URL "Beast/Index".  function runReportMessage() { $("#runReport").html("Running the report. Please wait"); $("#financialDataBtnRun").attr("disabled", "disabled"); $("#bottomBtnRun").attr("disabled", "disabled"); $("#btnRun").attr("disabled", "disabled"); $("#hiddenSubmit").val("Run Report"); $.post("/Beast/Index", $("#beastForm").serialize(), function(result) { window.open(result.message); $("#runReport").html(""); $("#financialDataBtnRun").removeAttr("disabled"); $("#btnRun").removeAttr("disabled"); $("#bottomBtnRun").removeAttr("disabled"); }, "json"); }  I tried using the Url.Action but with no luck. This is the code that I tried. It's not working on the VS Development Server either.  var myLink = &#

Problem with ASP.NET Ajax, Framework version 4.0 and the SeaMonkey browser...

I have a site that I'm upgrading to the 4.0 framework and I've come across an issue with asp.net ajax and the SeaMonkey browser. It seems like the script manager is not registering the scripts on the page in seamonkey (but it works fine in IE, Firefox, Chrome, Opera, and Safari). Now, if I change the user agent string in SeaMonkey to use the user agent string from any of those other browsers, it works fine. So I guess my question is does ASP.NET Ajax check the browser's user agent to determine what scripts to register and, if so, is it possible that SeaMonkey is not included in the list in the 4.0 framework (I should add that it's working fine in the 3.5 framework so it seems to me like this is a difference between the two framework versions).

Problem importing text files with binary zeros (0x00) via SSIS(SQL2005). It is all fine when using D

Hi.   There is a "text" file generated by mainframe and it has to be uploaded to SQL Server. I've reproduced the situation with smaller sample. Let the file look like following: A17     123.17  first row          BB29    493.19  second             ZZ3     18947.1 third row is longer And in hex format: 00:  41 31 37 20 20 20 20 20 ? 31 32 33 2E 31 37 20 20  A17     123.17  10:  66 69 72 73 74 20 72 6F ? 77 0D 0A 42 42 32 39 20  first row??BB29 20:  20 00 20 34 39 33 2E 31 ? 39 20 20 73 65 63 6F 6E     493.19  secon30:  64 0D 0A 5A 5A 33 20 20 ? 20 20 20 31 38 39 34 37  d??ZZ3     1894740:  2E 31 20 74 68 69 72 64 ? 20 72 6F 77 00 69 73 20  .1 third row is 50:  6C 6F 6E 67 65 72       ?                          longer          I wrote "text" in quotes because sctrictly it is not pure text file - non-text binary zeros (0x00) happen sometimes instead of spaces (0x20).   The table is: CREATE TABLE eng ( src varchar (512) )   When i upload this file into SQL2000 using DTS or Import wizard, the table contains: select src, substring(src,9,8), len(src) from eng <               src                ><substr>             <len> A17     123.17  first row           123.17                  25BB29                                493.19                  22ZZ3     18947.1 third row           18947.1                 35   As one can see, everything was importe

How to eliminate html tags from text boxes

Hi all,   In my application I am using a login screen. While a new user registers he has to fill the First name and Last name. There is a user search option. The details of the users will be shown in the user details page. Some users try to add html tags like </td></tr> with first name and last name. So after rendering from DB the page alignment is breaking.   How to fix this problem??   How can I avoid html tags while entering the user details?   Please give me a solution:-   Thank You  

ajax combobox having problem in binding data

Hi i am using ajaxtoolkit:combobox and i tried to bind data to this control in code behind file. but it is taking 3 to 4 mints to bind data and display the page. what is the problem? I am providing my aspx code and code behind code here<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="TestPage.aspx.cs" Inherits="Dashboards_TestPage" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server"> <asp:ScriptManager runat="server" ID="scriptMgr"> </asp:ScriptManager> <table border="1"> <tr> <td> <ajaxToolkit:ComboBox ID="ddlProgram" runat="server" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" CaseSensitive="False" MaxLength="10"> </ajaxToolkit:ComboBox> </td> </tr> </table> </asp:Content>  Code behind code:public partial class Programs_TestPage : System.Web.UI.Page { ProgramData programData = new ProgramData(); protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack)

Problem with AJAX - template

Hi, I tried something with the templates of the AJAX-framework, but I can't get it work:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <div id="container"> </div> <div id="template" style="display:none;"> Hallo {{ Vorname }} {{ Nachname }} <br /> </div> <script src="scripts/MicrosoftAjax.debug.js" type="text/javascript"></script> <script src="scripts/MicrosoftAjaxTemplates.debug.js" type="text/javascript"></script> <script type="text/javascript"> var person = { Vorname: "Christian", Nachname: "Kiefer" }; function pageLoad() { var t = new Sys.UI.Template($get('template')); t.instantiateIn($get('container'), person); } </script> </body> </html>   I get the error message: "Runtime error in Microsoft JScript: 'Vorname' ist undefined" Can someone see the error?   thanks   Christian
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