473,465 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How we have to Use Textbox in Ajax

144 New Member
Hai friends,

I am doing project in ASP.NET(vb) , I have Installed the software Microsoft ASP.NET 2.0 AJAX Extensions

My Question is

I have 2 Textbox

Regno:- Textbox1
Name :- Textbox2

Whenever any student enter his regno , it automatically take his name from student table and display in textbox2 , As I am setting Autopostback=true the whole page Refreshes, I want only that 2 textbox alone refresh,

What I have to do That..............

I am Blank in Ajax..........

Pl help me............

Thanks in Advance...........

Davidson

Posted Date:- 29 Feb 2008
Feb 29 '08 #1
4 1109
acoder
16,027 Recognized Expert Moderator MVP
Since you're using AJAX.NET, this question will probably be better answered in the .NET forum. Moved from JavaScript forum.

Moderator.
Feb 29 '08 #2
davidson1
144 New Member
Hai friends,

I am doing project in ASP.NET(vb) , I have Installed the software Microsoft ASP.NET 2.0 AJAX Extensions

My Question is

I have 2 Textbox

Regno:- Textbox1
Name :- Textbox2

Whenever any student enter his regno , it automatically take his name from student table and display in textbox2 , As I am setting Autopostback=true the whole page Refreshes, I want only that 2 textbox alone refresh,

code as Follows written under Textbox1 Event:-

Dim cn As New System.Data.sqlclient.SqlConnection
Dim tbsid1 As String
Dim rd As sqlDataReader
Dim rd1 As sqlDataReader

cn.ConnectionString = "Persist Security Info=False;User ID=sa;Initial Catalog=master;password=david;"
cn.Open()

Dim cmd1 As New SqlCommand("select count(*) from Student where RegNo='" & textbox1.Text & "'", cn)
rd1 = cmd1.ExecuteReader
rd1.Read()
If rd1(0) = 0 Then
Label1.Text = "Invalid Regno"
Exit Sub
End If
rd1.Close()


Dim cmd As New SqlCommand("select StudentName from Student where RegNo='" & textbox1.Text & "'", cn)
rd = cmd.ExecuteReader
If rd.Read() Then
textbox2.Text = rd(0)
End If



What I have to do That..............

Anything I have link between Asp.net to Ajax

I am Blank in Ajax..........

Pl help me............

Thanks in Advance...........

Davidson

Posted Date:- 29 Feb 2008
Feb 29 '08 #3
davidson1
144 New Member
Hai friends,

I am doing project in ASP.NET(vb) , I have Installed the software Microsoft ASP.NET 2.0 AJAX Extensions

My Question is

I have 2 Textbox

Regno:- Textbox1
Name :- Textbox2

Whenever any student enter his regno , it automatically take his name from student table and display in textbox2 , As I am setting Autopostback=true the whole page Refreshes, I want only that 2 textbox alone refresh,

code as Follows written under Textbox1 Event:-

Dim cn As New System.Data.sqlclient.SqlConnection
Dim tbsid1 As String
Dim rd As sqlDataReader
Dim rd1 As sqlDataReader

cn.ConnectionString = "Persist Security Info=False;User ID=sa;Initial Catalog=master;password=david;"
cn.Open()

Dim cmd1 As New SqlCommand("select count(*) from Student where RegNo='" & textbox1.Text & "'", cn)
rd1 = cmd1.ExecuteReader
rd1.Read()
If rd1(0) = 0 Then
Label1.Text = "Invalid Regno"
Exit Sub
End If
rd1.Close()


Dim cmd As New SqlCommand("select StudentName from Student where RegNo='" & textbox1.Text & "'", cn)
rd = cmd.ExecuteReader
If rd.Read() Then
textbox2.Text = rd(0)
End If



What I have to do That..............

Anything I have link between Asp.net to Ajax

I am Blank in Ajax..........

Pl help me............

Thanks in Advance...........

Davidson

Posted Date:- 29 Feb 2008

--------------------------------------------------------------------------------
Feb 29 '08 #4
Plater
7,872 Recognized Expert Expert
Threads merged.
Please stop double posting and read the Posting Guidelines under the "Help" menu.

MODERATOR
Feb 29 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Scott McDaniel | last post by:
The code below cannot locate the Textbox "tbDuration" in my ASP.NET 2.0 page. <Ajax.AjaxMethod()> _ Public Function calcTimeSpan(ByVal StartTime As String, ByVal EndTime As String) As String Dim...
2
by: it | last post by:
Hello. I want to implement Incremental find of TextBox by ASP.NET AJAX . Could you please teach me how to get it ? Thank you.
1
by: sivagururaja | last post by:
Hi All, Im using ASP.NET with C#. (.NET 2005) In my page i want to allow the user to search the text from the SQL table. This is my table ID Name City State 1 Parry ...
6
by: HockeyFan | last post by:
I'd like to have an AJAX textbox that after the user fills in, will auto-fill another textbox on the page without having a postback occur. It doesn't have to do any filtering or any other thing...
2
by: phanimadhav | last post by:
Actually this is my tabledetails Table Name:Organisation Colums:Org_Id,org_Name,Org_Nationality Organisation namess is:Wipro,satyam,CTS,CMC,Infotech,Intel,Syentel,CISCO my requirement is if...
1
by: anush | last post by:
Hi, I want to create a ajax textbox where when I add some content and save it, it saves the content and also appends the username to the content. And when I clcik the edit button, I just get the...
0
by: mackpag | last post by:
i want to save the data which is written in textbox when i exit from the textbox that means when i lost the focus from textbox. the textbox is in the grid. so how to do that. the grid is in...
5
by: Max | last post by:
I tried the following with Web Dev 2008 with -and- without Ajax Extension 3.5 - using IE 7 I reduced my webform1 to a Scriptmanager and an Updatepanel with 2 textbox and a button. I type something...
10
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.