473,385 Members | 2,269 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,385 software developers and data experts.

TextBox and Button Visible true or false problem

hi
I am creating travels project, in left part of my datagrid of my default page i placed all the products such as india tour ,world tour etc and if v click any product it will redirect to itennary page according to their ID's
my problem is i inserted new product as Hotel Booking and i want to place textbox and a button in the itenary page and if v click india tour or world tour i want those textbox and button should be not visible and if v click Hotel booking then those textbox and button should visible
Please solve my problem its urgent.
Thank you in advance
raghu
Feb 11 '08 #1
4 2488
int08h
28
in Page_Load method
protected void Page_Load()
{
//Only an example, use your way to get ID
int id = int.Parse(Request.QueryString["ID"]);

if (id == "world tour") //etc...
{
TextBox1.Visible = false;
Button1.Visible = false;
}
}
Feb 11 '08 #2
Sorry i am getting error near
if (id == "world tour")
Error 1 Operator '==' cannot be applied to operands of type 'int' and 'string'
Feb 11 '08 #3
priyamv
17
You have to check for the id from the querry string

if id from querry string =Hotelmgt id then

textbox.visible=true
Buttonid.visible=true

else

textbox.visible=false
Buttonid.visible=false
Feb 11 '08 #4
sorry still i am not able to get can u please give me the code in c#
Feb 11 '08 #5

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

Similar topics

0
by: awightma | last post by:
Hi, I have a datagrid with a number of textboxes on it. I want one column of my table to be visible=false because it contains the id of the record from the table. For some reason when I set...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
2
by: A. Nonymous | last post by:
Hello, I am trying to set up a panel that appears on a page that prompts a user to enter in a note. This panel object is initially invisable and appears when the user clicks on a button. ...
5
by: hanolo | last post by:
Does anyone ever see this happen. I build a form with couple of textbox server control. When user inputs character ` in there, after form post back, the textbox become a line of string such as...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
2
by: bindurajeesh | last post by:
I have a web form that has a textbox that receives a password. Upon leaving the txtbox the user name and password queries the table in objoledbcommand.connection to determine if correct password...
0
by: Dan | last post by:
Issue making textbox visible based on specific input from a radio button list in an EditItemTemplate I want to setup a gridview that when in edit mode and when the user selects "Other" from a...
4
by: slinky | last post by:
I have a textbox that a user enters the current time (in this case at the end of a task, and it gets its value via a button's click event and getting its value from =Now() ). Is there a way to...
0
KalariaNitya
by: KalariaNitya | last post by:
Hello, could anybody help me? i have gridview, inside gridview i have one Update button & textbox update button update the quantity entered in textbox. i want to update the quantity on textbox on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.