Showing posts with label textboxes. Show all posts
Showing posts with label textboxes. Show all posts

Monday, March 26, 2012

getting in textbox while retrieving

hi,
I am using sql server database. In my table i am having three columns namely Name, age and salary. I am having three textboxes in my webform to retrieve data from the database.The column salary has no value in the database. When i retrieve the values in to textbox controls, i am getting in my textbox for the salary field.

How to overcome this.?

pls help

Are you HTML Encoding the values that appear in the TextBox?|||

(1) It is a good idea to default 0 in the column.(2) You could do a convert to double in the front end.

If you still have problems please post some code as to how you are populating the textbox.

Monday, March 19, 2012

Get value of 10 textboxes to decide footer color

If I have the 10 textboxes in my footer with a value of "X" (from an IIF() expression), then I would like to alert the users and have the footer a different color.

I'm trying to get the value of the textbox, but keep getting an error of it being undeclared. I'm trying different syntax, but can't get it to work.

Here's the code:

=
IIF(
textbox11 ="X" or textbox15="X" or textbox19="X" or textbox27="X" or textbox23 = "X" or textbox31 = "X" or textbox35 = "X" or textbox39 = "X" or textbox43 = "X" or textbox47 = "X"
,"Gainsboro","Transparent")

I am also trying to reference a textbox.value in a different textbox with the same error.

How do you accomplish this in RS for SQL 2000?

Jason|||You need to use the ReportItems collection:

IIF(
ReportItems!textbox11.Value ="X" or ReportItems!textbox15.Value="X" or ReportItems!textbox19.Value="X" or ReportItems!textbox27.Value="X" or ReportItems!textbox23.Value = "X" or ReportItems!textbox31.Value = "X" or ReportItems!textbox35.Value = "X" or ReportItems!textbox39.Value = "X" or ReportItems!textbox43.Value = "X" or ReportItems!textbox47.Value = "X"
,"Gainsboro","Transparent")|||That seems to get me closer, but it still doesn't get me past the scope issue. I've moved my post to a seperate thread with a more detailed description of what I'm trying to do.

Jason