473,395 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

if there is any way to make visible and keydown event in html text box and combo?

nirmalsingh
218 100+
i am usinjg ajax technology with c# code behind. i have created html table using c# just like
Response.Write("<table>");
....
....
....
Response.Write("</table>");

i want to display text box inside table cell only at when i click the cell of a table,
and after i type some text and if press enter key, the curent text box in the cell need to be invisible and combo box in next cell should be visibled. and the typed data in text box should be placed in particular cell. atlast i want to read all the data from from table and store in database. help me with sample code plz..
Jan 17 '07 #1
3 1430
radcaesar
759 Expert 512MB
You have to achieve this using JavaScript.

use document.formname.textbaxname to access the particular controls in the form and use the events of that control to hide and get values.

:)


i am usinjg ajax technology with c# code behind. i have created html table using c# just like
Response.Write("<table>");
....
....
....
Response.Write("</table>");

i want to display text box inside table cell only at when i click the cell of a table,
and after i type some text and if press enter key, the curent text box in the cell need to be invisible and combo box in next cell should be visibled. and the typed data in text box should be placed in particular cell. atlast i want to read all the data from from table and store in database. help me with sample code plz..
Jan 17 '07 #2
AricC
1,892 Expert 1GB
i am usinjg ajax technology with c# code behind. i have created html table using c# just like
Response.Write("<table>");
....
....
....
Response.Write("</table>");

i want to display text box inside table cell only at when i click the cell of a table,
and after i type some text and if press enter key, the curent text box in the cell need to be invisible and combo box in next cell should be visibled. and the typed data in text box should be placed in particular cell. atlast i want to read all the data from from table and store in database. help me with sample code plz..
What code do you have already? Please post what you have so people can make changes.

Aric
Jan 17 '07 #3
nirmalsingh
218 100+
private void loadTable()
{
string strAlpha=Request.QueryString["alpha"];//get the alphabets
int intPageValue=Convert.ToInt16(Request.QueryString["Pager"]);//get the page value
string[] strDetails;
string strData;
int i;
int intRowCount;
//get the data from database
if (strAlpha==null || strAlpha == "ALL")
{
strData=iGeneral.RetrieveRecords("b.bank_code,b.ba nk_name,b.address1,b.address2,c.city_name,b.zip_co de,s.state_name,b.country,b.phone1,b.phone2,b.cont act_person,b.fax1,b.fax2,b.email,b.website","city_ master c,bank_master b,state_master s","b.city_code=c.city_code and b.state_code=s.state_code");

}
else
{
strData=iGeneral.RetrieveRecords("b.bank_code,b.ba nk_name,b.address1,b.address2,c.city_name,b.zip_co de,s.state_name,b.country,b.phone1,b.phone2,b.cont act_person,b.fax1,b.fax2,b.email,b.website","city_ master c,bank_master b,state_master s","b.city_code=c.city_code and b.state_code=s.state_code and b.bank_name like '" + strAlpha + "%'");
}
strDetails=strData.Split('|');
intRowCount = strDetails.Length;
Response.Write("<table width=50% border=0 cellpadding=3 cellspacing=0 class=tbox1 id=results>");
Response.Write("<tr class=headbggrey color=grey>");
Response.Write("<td align=center valign=top class=formleftheading>");
Response.Write("<span class=formleftheading></span>");
Response.Write("<td valign=top class=formleftheading>BANK NAME</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>ADDRESS1</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>ADDRESS2</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>CITY</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>ZIP-CODE</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>STATE</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>COUNTRY</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>PHONE1</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>PHONE2</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>REFERENCE</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>FAX1</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>FAX2</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>EMAIL</td>");
Response.Write("</td>");
Response.Write("<td valign=top class=formleftheading>WEBSITE</td>");
Response.Write("</td>");
Response.Write("</tr>");
string[] strArrCol;//to set Column Value

strArrCol=strDetails[i].Split('^');
Response.Write("<tr>");
Response.Write("<td width=25 align=left valign=top class=formleftheading><input name=optBank id = optBank type = radio onclick=RadioClick('"+ strArrCol[1] +"','"+strArrCol[0]+"','"+strArrCol[2]+"','"+strArrCol[3]+"','"+strArrCol[4]+"','"+strArrCol[5]+"','"+strArrCol[6]+"','"+strArrCol[7]+"','"+strArrCol[8]+"','"+strArrCol[9]+"','"+strArrCol[10]+"','"+strArrCol[11]+"','"+strArrCol[12]+"','"+strArrCol[13]+"','"+strArrCol[14]+"','Modify')></td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[1] + " </td>");

Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[2] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[3] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[4] + " </td>");
string demo= strArrCol[4];
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[5] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[6] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[7] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[8] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[9] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[10] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[11] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[12] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[13] + " </td>");
Response.Write("<td align=left valign=middle class=formleftheading> " + strArrCol[14] + " </td>");
Response.Write("</tr>");

Response.Write("</table>");
}
Jan 19 '07 #4

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

Similar topics

0
by: CoderOfBugs | last post by:
I am developing an IE Toolbar that has a combo box. The combox box doesn't fire the KeyDown event when the {Backspace} key is pressed. Very strange. The event fires for {Delete}, {Space}, {CTRL},...
34
by: Andrew DeFaria | last post by:
I thought this would be fairly straight forward but apparently it's not. Given the following html file: <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head>...
3
by: trint | last post by:
Ok, I have tried to do this with the System.Web.UI and can't find anything for the webform. It seems much easier for a Winform. Any help in trapping Webform keydown event and keyup event is...
4
by: Anne | last post by:
hie again, i have 3 textbox and i would like the user to go to the next textbox by pressing the 'ENTER' key. i have tried using this: Private Sub txtRequestor_KeyDown(ByVal sender As...
16
by: Miguel Dias Moura | last post by:
Hello, i have 5 panels in an ASP.net / VB page. The panel 1 is visible the other 4 are NOT visible. I also have 5 images: image 1, image 2, ..., image5. When i click one of the images,...
9
by: pvsundarram | last post by:
hey, i am trying to cancel the keydown event for certain keycodes( for eg:- enter key ).But the cancelling of this event is not happening in firefox. Is there any way to cancel the event in the...
1
by: feeman | last post by:
I have a form in access 2000 with a combo box containing names, this is linked to a sub form by the name index. on the sub form is a button that when pressed automatically enters the date into the...
2
by: GS | last post by:
I was trying to catch the control enter key sequence of a combo box in the keydown event, but I failed to se anything like control enter, neither Did I find in keypresssed event I tried google...
2
by: mndprasad | last post by:
Hi friends, Am new to AJAX coding, In my program am going to have two texbox which going to implent AJAX from same table. One box is going to retrieve the value of other and vice...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.