| | |
Textbox and button visible true or false problem
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
That's right the variable id is an integer, "world tour" is a string literal you cannot apply the == operator to these different types.
I can see you are either very very green or a forum troll. If the former you need to get a book on basic programming. One that starts from the beginning explaining types and stuff. If the latter I'm done here.
I can see you are either very very green or a forum troll. If the former you need to get a book on basic programming. One that starts from the beginning explaining types and stuff. If the latter I'm done here.
You're very close. You have the ID, you need a function in itenary.aspx.cs you can pass the ID too, the function should look the ID up and see if it's the hotel booking catagory and return true or false
C# Syntax (Toggle Plain Text)
public class itinery { //all your existing code blah... private bool IsHotelBooking( int catId) { //connect to db pass catId as parameter //somrthing like string catName = command.ExecuteScalar(); if(catName == "hotel booking") return true; else return false; }
•
•
•
•
still i am getting the same error,when i given hotel booking ID
Don't put the hotel booking id in quotes (I'm guessing that's what you've done). And hard coding an ID into your program logic is very poor, but I guess there's time for that later when you've learned more.
I do understand. But yes you can attach it. Click the Go Advanced button below the reply box. You'll get a bigger editor. SCroll the page down a bit and there's a manage attachments button.
![]() |
Similar Threads
- GridView cell textbox.Visible = true (ASP.NET)
- datagrid, innertext, javascript, database update (ASP.NET)
- Why javascript does not work on firefox? (JavaScript / DHTML / AJAX)
- error on page!! Cannot solve!!Help (ASP.NET)
- Validation help (Visual Basic 4 / 5 / 6)
- Validation difficulties *sigh* (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: Shell() command line
- Next Thread: ComboBox Item selection
| Thread Tools | Search this Thread |
.net access activedirectory ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development disabled displayingopenforms draganddrop drawing encryption enum event excel exectuable file files form format forms ftp function gdi+ httpwebrequest image index index-error input install java label list listbox listener mandelbrot math mathematics mouseclick mysql operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox serialization server setup sleep socket sql statistics stream string table tcp text textbox thread time timer update user usercontrol validation visualstudio webbrowser windows winforms wpf xml






