.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT
Post New Web Links

Multiline Grid Cell Displays correctly in IE but not FireFox or Safari

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

Using C#

in the ASPX file, I define a grid:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        BorderStyle="Double" Caption="Club's Dashboard"
        CaptionAlign="Top" Width="292px" EnableTheming="False"
        HorizontalAlign="Left" CellPadding="5">
          <HeaderStyle BackColor="Fuchsia" Wrap="False" />
          <RowStyle HorizontalAlign="Center" Wrap="False" />
           <asp:boundfield datafield="B2" headertext="." htmlencode="false"/>

          <asp:boundfield datafield="P

View Complete Post

More Related Resource Links

Background image of Anchor not working with Safari/Firefox

Hi, I have following Css where i have used back-ground image. Then i am generating Anchor and assigning css class which has image. It works fine with IE but does not work with Safari,Firefox and Chrome. Can anyone help me on how to fix it. I have given details below. Thanks, Chandan Css .HOME { BACKGROUND-IMAGE: url(../images/home.jpg); WIDTH: 56px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 20px } .HOME A { WIDTH: 56px; HEIGHT: 20px } .HOME A:hover { BACKGROUND-IMAGE: url(../images/home1.jpg); WIDTH: 56px; HEIGHT: 20px } Html Code<td class="home"> <A href="#" class="home" onclick="showpage('abc.html')"/></td>

Grid control displays a hyperlink. (in WPF)

Hello, I'm making application, that's received a text from web.   get the text following the code is shown below.   For Each Status As Status In A.GetList grdList.RowDefinitions.Add(New RowDefinition() With {.Height = GridLength.Auto}) Dim TextBlock As New TextBlock() TextBlock.Margin = New Thickness(4) TextBlock.TextWrapping = TextWrapping.Wrap TextBlock.Inlines.Add(Status.Text) Grid.SetColumn(TexatBlock, 1) Grid.SetRow(TextBlock, grdList.RowDefinitions.Count - 1) grdList.Children.Add(TextBlock) Next TextBlock is added, the grid view control does not display a hyperlink. So, Does not display the URL as a hyperlink. What should I do in the grid control will display the URL as a hyperlink? plz, help me

Datalist and Repeater in Firefox Displays Erratically

Problem----------I've narrowed this down to ONLY happening in FireFox. I've troubleshooted this for hours, and endlessly searched Google for a solution and absolutely cannot find one.DOES NOT occur in IE, Chrome or Safari (Windows), in these browsers it renders normally.So randomly when my category page renders about 50% of the time, the products in the middle of all of the other products on the page are rendered out of position, almost as if the tags closed to early and disorients the whole page.My original layout consists of my products on our website displayed using a asp:repeater with the items wrapped in a anchor tag (asp:LinkButton) with display: block, float: left, and width and height are set.My modified layout consists of a datalist with the items wrapped in a asp:LinkButton, display: block, width and height set, and NO float.I've tried moving the databinding to Page_Init, Page_Load, Page_Prerender, and Page_LoadComplete and also tried it in each one with "If IsPostBack" and "If Not IsPostBack"None of the modification I made resolved the issue. Remember, it randomly happens, and the other times in renders how it suppose to.URL To Check Problem--------------------STEP 1: navigat to http://shopbelieve.com/STEP 2: Click "Supporters Shop Now"STEP 3: Select "Colorado" from dropdown, then start typing "Believe Elementa

InfoPath 2010 Web forms in IE and Firefox regarding the Multiline text box


Could someone please confirm if this is a bug.

I created an InfoPath form in 2010. As an Infopath form, the multiline textbox grows, as a user enters text, automatically as expected.

The very same form as a web form:

In IE 7 and IE 8 the box expands at every 20 or so chharacters instead of at the end of a line.

In Firefox (3.xxx) the box does not expand unless you press enter at the end of every line.

In IE 7 and IE 8 if you open a form that was created with FireFox, the boxes end up expanding as if it had been entered in IE instead of FireFox. FireFox seems to be the most compatable but how do I explain to user that they can use IE for everything but forms?

The question is this: Is it a bug because I would think the box should be dynamic as the user eneters data and should not require the user to press enter. When will this be fixed. It is holding us up as to ever being able to use InfoPath Web based forms which is a requirement because InfoPath based forms are not supported on any OS other than Windows. Web Based forms should operate and be available regardless of the browser type. Please advise.

Greg McAllister

Change value of particular cell in Grid view at run time.



I need to know that how i can edit the particular cell value in grid view at run time just by clicking it(value) then it shows text box and after enter any value, it then save in database.

Waiting for response.

Thanks in advance.

how to sum the rating value in a grid view row with previous value of that cell?


hi all 

 i have grid view and in item template i use a ajax rating out side the grid view rating work well but inside no.

i want to sum the value that client vote with the previous votes i read many tuterials but i cant sum.here is my code:

<asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1">
            <asp:CommandField ShowEditButton="True" ShowSelectButton="True" />
            <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" 
                SortExpression="id" />
            <asp:BoundField DataField="tozihat" HeaderText="tozihat" 
                SortExpression="tozihat" />
            <asp:BoundField DataField="url" HeaderText="url" SortExpression="url" />
            <asp:BoundField DataField="price" HeaderText="price" SortExpression="price" />
            <asp:TemplateField HeaderText="mark" SortExpression="mark">
                    <asp:TextBox I

How to Disable Specific Column in Data Grid View and write something in Cell and load data in anothe


Hello All  ,

i have data grid view and i want to disable specific column from writing in it and in another column 

i want to write something like item code and load the item name automatically in the corresponding cell in the disabled column 

i hope that i write my problem correctly and you can understand what i want :)

thanks in advance ,

Kareem Naguib

Safari, Firefox


Greetings - I am trouble shooting some classic ASP code that has an included file that contains a function that accepts a datatable as input and loops thru and creates an html table to house the data and writes it using response.write to the page.  The problem is that firefox and safari both briefly display the table and then it disappears.  I can solve this by adding a response.end after it is written but this causing other controls on page to cease firing any event or postback.

It is possible that the dynamic HTML is poorly formed and safari and firefox don't like it.  If so, how would I view it before it disappears?


Any ideas?








Cell Width in a Data Grid


Hello Guys,

 I am trying to set a constant width to a cell in a data grid....how do i approach to this





Small problem with displaying custom calendar cell text from db in Safari


using VS2010

I'm using the calendar control to create a simple event calendar. I want to add a small bit of custom text just below the date of any cell that contains an event on that date.

The code:

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
      string connString = ConfigurationManager.ConnectionStrings["CalendarConnectionString1"].ToString();
      SqlConnection myConnection = new SqlConnection(connString);
      SqlDataAdapter myAdapter = new SqlDataAdapter("GetEvents", myConnection);
      DataSet myDataSet = new DataSet();
      myAdapter.Fill(myDataSet, "Table");
      //If the month is CurrentMonth
      if (!e.Day.IsOtherMonth)
        foreach (DataRow dr in myDataSet.Tables[0].Rows)
          if ((dr["Date"].ToString() != DBNull.Value.ToString()))
            DateTime dtEvent = (DateTime)dr["Date"];
            if (dtEvent.Equals(e.Day.Date))
              e.Cell.BackColor = Color.MediumAquamarine;
              Label label = new Label();
              label.Text = "</br>";
              label.Text += dr["Title"].ToString();              

Jquery scripts in user control works fine in explorer but not in Safari/Firefox



Hi everyone,

I've used some Jquery scripts for toggling image on a web user control, it work fine in explorer but got no signs of life in firefox!

Here the code for a test form in plain html (this works on every browser):

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/toggle.js"></script>

<div id="invisible">
   <a href="images/accurate.gif" class="swap" rel="lightbox"><img src="images/polaroid_control.gif" id="showimage" /></a>
But i need to use it in a user control so i got:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="gallery_admin_search.ascx.cs" Inherits="CMS_GalleryControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<div id="invisible">
    <img src="images/polar

Multiline WPF Datagrid Cell



I am binding a data table with information about a "location" andwould like to understand how I can use the values from multiple columns into a single cell. In the sample code below I would like to  achive a single multiline row for each "location" so it looks something like:

W1 1

Any help appreciated


<Window x:Class="Window1"

javascript not working in Firefox/Safari


I hope this is the correct place for this post as it's relevant to both ASP.NET and Javascript.

I am creating a nested ListView. In the ListView1 the first column contains an asp:Literal control named LiteralTreeIcon.

In the event OnItemDataBound of ListView1 I am doing the following:

Literal treeIcon = e.Item.FindControl("literalTreeIcon") as Literal;

if (treeIcon != null)
treeIcon.Text = invoices.Count() == 0
? "<img src=\"../Images/treedot.gif\" alt=\"\" height=\"16\" width=\"16\" />"
: String.Format(
"<img src=\"../Images/buttonplus.png\" alt=\"\" height=\"16\" width=\"16\" onclick=\"javascript:toggleGroup(this,'invoices{0}');\" />", header.ID);

This is working correctly, as in the icons are changing depending if there is data in the second ListView or not.

I then have a Javascript function in my ASP.NET page:

function toggleGroup(img, childName) {
var src = img.src;
var parentObject = document.getElementById(childName);

if (parentObject == null) {

Access gridview row using javascript (row/cell index works in IE not in Firefox )


Hello All,

I have a gridview with checkboxes and textboxes. When i click on a checkbox i want the associated textbox to be enabled/disabled. I wrote the for following javascript that.

 for (var i = 1; i <= grid.rows.length - 1; i++) {
                   if (grid.rows[i].cells[0].childNodes[2].checked) {
                       grid.rows[i].cells[1].childNodes[0].disabled = false;
                   else {
                       grid.rows[i].cells[1].childNodes[0].disabled = true;

images are not rendering in Firefox but are in Safari



i'm not sure i'm posting in the right form thread so apologies if this belongs elsewhere. 

I have a website www.findmyhomefromhome.com . When you click on any thumbnail image Safari renders the images but in Firefox show up as binary garbage. (safari does not render gif images but does .jpeg images)

in my .cs file for the gridview itemtemplate I supply the following string

string stringvalue = "<a href=\"javascript:void(window.open('FullImage1.ashx?picid="

            + picid

            + "','_blank','toolbar=no,menubar=no'))\" > <img src='ThumbNailImage.ashx?picid="

            + picid

            + "'> </a>";


The images are mostly of type jpeg but i'd like to support other image types as well if that's not too much of a hack. 

I don't know what other information is relevant so i'll wait to be asked. 



Problem in firefox and safari to call ajax method?


why does my below method not work with firefox and safari, every time it goes on OnFailed method?

is there setting requirement in browser to call page Method ?

also In IE method is calling sucessfully, but why alert message does not come ?

function SendMessage() {
      var user = document.getElementById('<%=User.ClientID %>');
      var val = user.value;
      var random = 2345;
      var nonRandom =12345;
        var toAddress = val;
        PageMethods.SendResetMailMessage(toAddress, random, nonRandom, CloseWindow, OnFailed);

    function CloseWindow(ret) {
      // Below code is usedOnClick="OnForgotPassword_Click" to close the window, if mail has been sent to the user sucessfully.
      if (ret == "1") {
        var windowObj = window.self;
        windowObj.opener = window.self;

Page not rendering correctly in IE or Opera but works as expected in FF, Safari, Chrome


I have a page that implements a 3rd party's calendar coded in asp script.  The pages are designed to be centered in the browser window, however, the page that implements the calendar application is aligned left and it appears to ignore the div that contains my footer. This phenomenon happens only in IE. Opera, FF, Safari and Chrome render the content in the middle of the browser window.

In Opera, all of the pages are rendered centered, however, a space is appearing between the footer and content divs. Moreover, the page that renders the calendar seems to ignore the footer div like IE does.

The way the calendar is rendered is via the %%CONTENT%% token in the table that exists in the "textContent" div.

To see the issue live: http://www.batiksgalore.com/calendar.asp

The code for the calendar page is below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <meta http-equiv="Content-Language" content="en-us" />
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
  <title>Batiks Galore Eve
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend