473,419 Members | 1,698 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,419 software developers and data experts.

Problem with Column set as visible=false

I have a column in a list where I need to keep track of some data (but not
show it) and am setting it as false. This works fine in IE, but Netscape
and Mozilla show a little space where the column is (even though they don't
show any data).

The line is:

<td>
<asp:Label visible="false" id="lblPositionID" runat="server"
Text='<%# DataBinder.Eval(Container, "DataItem.PositionID") %>' />
</td>

Is there a way to make it work correctly in Netscape and Mozilla?

Thanks,

Tom.
Nov 19 '05 #1
8 2196
You might try adding some code to your web.config file to force Mozilla
and Netscape to render as "uplevel" browsers. By default, ASP.net
considers newer version of non-IE browsers as only understanding HTML
3.2. You can add the code specified at
http://blogs.biasecurities.com/jim/a...11/03/740.aspx, and it
will render in more up to date HTML, which might fix your issue.

Jason

Nov 19 '05 #2
WJ

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
I have a column in a list where I need to keep track of some data (but not
show it) and am setting it as false


I would use the Html/Hidden Field instead.

John
Nov 19 '05 #3
"WJ" <Jo*******@HotMail.Com> wrote in message
news:Oq**************@TK2MSFTNGP15.phx.gbl...

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
I have a column in a list where I need to keep track of some data (but not
show it) and am setting it as false
I would use the Html/Hidden Field instead.


That worked. I never think about using html attributes when using asp tags.

Thanks,

Tom.
John

Nov 19 '05 #4
"Jason" <ja***********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
You might try adding some code to your web.config file to force Mozilla
and Netscape to render as "uplevel" browsers. By default, ASP.net
considers newer version of non-IE browsers as only understanding HTML
3.2. You can add the code specified at
http://blogs.biasecurities.com/jim/a...11/03/740.aspx, and it
will render in more up to date HTML, which might fix your issue.
Where in web.config would this go?

Thanks,

Tom.
Jason

Nov 19 '05 #5

"tshad" <ts**********@ftsolutions.com> wrote in message
news:OD****************@TK2MSFTNGP14.phx.gbl...
"WJ" <Jo*******@HotMail.Com> wrote in message
news:Oq**************@TK2MSFTNGP15.phx.gbl...

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
I have a column in a list where I need to keep track of some data (but
not show it) and am setting it as false
I would use the Html/Hidden Field instead.


That worked. I never think about using html attributes when using asp
tags.


Actually, it didn't work. I was thinking of something else when I tried it.

How would I use this with asp.net? The tag has to be filled from the
server.

<asp:Label visible="false" id="lblPositionID" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.PositionID") %>' />

How would I change this to work with HTML?

Thanks,

Tom.

Thanks,

Tom.

John


Nov 19 '05 #6
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uy**************@TK2MSFTNGP14.phx.gbl...
"Jason" <ja***********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
You might try adding some code to your web.config file to force Mozilla
and Netscape to render as "uplevel" browsers. By default, ASP.net
considers newer version of non-IE browsers as only understanding HTML
3.2. You can add the code specified at
http://blogs.biasecurities.com/jim/a...11/03/740.aspx, and it
will render in more up to date HTML, which might fix your issue.
Where in web.config would this go?


Found out where it goes, but it didn't seem to fix the problem.

It still gives me:

1 <td width="100">
2 <span id="DataList1__ctl0_lblRefCode">MD102465M</span>
3 </td>
4 <td>
5
6 </td>
7 <td width="210">
8 <span id="DataList1__ctl0_lblJobTitle">Desktop Computer Support
Technician</span>
9 </td>

You can see the <td></td> tags at lines 4-6. In IE, these are gone.

The lines I am using to generate this is:
************************************************** ***************************************
<td width="100">
<asp:Label id="lblRefCode" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.ReferenceCode") %>' />
</td>
<td>
<asp:Label visible="false" id="lblPositionID" runat="server"
Text='<%# DataBinder.Eval(Container, "DataItem.PositionID") %>' />
</td>
<td width="210">
<asp:Label id="lblJobTitle" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.JobTitle") %>' />
</td>
************************************************** ****************************************

I need to hide the column but keep the data for use at postback.

Thanks,

Tom.
Thanks,

Tom.

Jason


Nov 19 '05 #7
WJ

"tshad" <ts**********@ftsolutions.com> wrote in message
news:Of**************@tk2msftngp13.phx.gbl...

How would I use this with asp.net? The tag has to be filled from the
server.


When you drop an Html/Hidden field onto an Asp.Net form (naming it as, say
"txtField"), the VS.Net generates two lines:

1. From code behind: "protected System.Web.UI.HtmlControls.HtmlInputHidden
txtField;"
2. From Html: "<P><INPUT id="txtField" type="hidden" name="txtField"
runat="server">"

From code behind, you can manipulate this hidden field by giving it a value,
say: txtField.Value="SomeThing";
From the Html document, you can use Java Script to manipulate the hidden
field, such as:

Form1.txtField.value="SomeThing";
Alert("Here="+txtField.value);

John

Nov 19 '05 #8

"WJ" <Jo*******@HotMail.Com> wrote in message
news:Ou**************@TK2MSFTNGP12.phx.gbl...

"tshad" <ts**********@ftsolutions.com> wrote in message
news:Of**************@tk2msftngp13.phx.gbl...

How would I use this with asp.net? The tag has to be filled from the
server.

When you drop an Html/Hidden field onto an Asp.Net form (naming it as, say
"txtField"), the VS.Net generates two lines:

1. From code behind: "protected System.Web.UI.HtmlControls.HtmlInputHidden
txtField;"
2. From Html: "<P><INPUT id="txtField" type="hidden" name="txtField"
runat="server">"

From code behind, you can manipulate this hidden field by giving it a
value, say: txtField.Value="SomeThing";
From the Html document, you can use Java Script to manipulate the hidden
field, such as:

Form1.txtField.value="SomeThing";
Alert("Here="+txtField.value);


Got it.

Thanks,

Tom John

Nov 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hanct | last post by:
"this" here refer to the form.. I type this.Visible=false;..but the form still can be seen! Worst still, the property editor has no Visible property to play with..why??is that a bug?? Wat the...
3
by: Adam Smith | last post by:
The following code in my onitemcreated works for some item rows in my datagrid, but not others. I am trying to set a linkbutton visible for downloading a file if the data is available in the...
5
by: johnb41 | last post by:
Is there any difference between: myControl.Hide vs myControl.visible=false and also: myControl.Show vs myControl.visible=true They seem to do the same thing. Any tips on when to use one...
2
by: kaosyeti | last post by:
i can't get this working. in vba i tried to set visible to false in an if statement that looked like this: Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer) If...
1
by: walanta | last post by:
I'm trying to get rid of the TextBox1 and Button1 on the page after posted back. However, it's still visible. Any idea why? protected void Page_Load(object sender, EventArgs e) { if...
4
by: Jimmy Stewart | last post by:
I have a calculated control "ContactInfo" on my form ... ="Attn: " & In the OnCurrent event for the form I have the following code... If Me.Contact Is Null Then Me.ContactInfo.Visible = False...
1
by: pdm | last post by:
hoi access, I have a subreport and with the id of inheritance of OOP I like to reuse this subreport in other main reports and hide some fields. First, is this possible and second what is the...
3
by: rishikaraj | last post by:
how to set the listview column visible= false please let me know the solution thanks
4
by: thecheyenne | last post by:
Hi there everybody; Fresh from reading my Access VBA for Dummies, I'd like to update my database about activities on a school outing. Here's what I'd like to achieve. The school outing costs...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.