Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am testing my project in a laptop and localhost. I have a datalist with images, and other text
drawn from a sql table. I also have some buttons at 'footer template'. This datalist is within
updatepanel. In default page in 'page load' within if(!IsPostback) I call the rows from table.
It works well. Now, when I click any button , the page is not going to localhost server because
of UpdatePanel.Well. But the images are flickering on button click. Can any one guide me on how
to stop this images flickering. The server is localhost.

Thanks.
Posted
Comments
Can you post the codes please?
S.Rajendran from Coimbatore 1-Dec-13 9:14am    
My codes:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
List<string> adds9 = new List<string>();
SqlDataAdapter da9 = new SqlDataAdapter("select ProductId,ProductName,PicturePath,DespatchCounts,Units,Rate,DescriptionStatic", con);
SqlCommandBuilder cb9 = new SqlCommandBuilder(da9);
DataSet ds9 = new DataSet("product");
da9.Fill(ds9, "product");
//int v_rowcount1 = 0;
for (int i = 0; i < ds9.Tables[0].Rows.Count; i++)
{
}
DataList1.DataSource = ds9;
DataList1.DataBind();
DataList1.Visible = true;


<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">


<asp:UpdatePanel ID="UpdatePanel133" runat="server" >
<contenttemplate>
<div class="SetMargin">
<asp:DataList ID="DataList1" runat="server" BackColor="AliceBlue" FooterStyle-BackColor="Red" RepeatColumns="3" Width="200" OnItemCommand="dl_item_command" RepeatDirection="Horizontal" >
<itemtemplate>
<table id="Table1" visible ="true">
<tr>
<td width="140px">
<p align="left">

<asp:Label ID="lblProductId" runat ="server" Visible="false"
Text= '<%#DataBinder.Eval(Container.DataItem, "ProductId")%>'>

</p>
</td>
</tr>
</table>
<table id="Table2" style=" margin-top:-33px" cellpadding="1" cellspacing="1" visible ="true">
<tr>
<td>
<td style="left:0px"width="200px">
<p align="left">

<asp:Label ID="lblProductName" runat = "server" Style=" color:Teal; font-size:larger"
Text=' <%# DataBinder.Eval(Container.DataItem, "ProductName")%>'>

</p>
</td>
</tr>
</table>

<table id="Table3" style=" margin-top:-33px" width="200px" cellpadding="1" cellspacing="1" visible ="true">
<tr>
<td>
<p align="left">
<img src= '<%#DataBinder.Eval(Container.DataItem,"PicturePath") %>'
style="height:200px;width:250px;border:1px solid gray;"/>
</td>
</p>
</td>
</tr>
</table>

<table id="Table4" cellpadding="1" style=" margin-top:-33px" cellspacing="1" visible ="true">
<tr>
<td width="130px">
<p align="left">
<asp:Label ID="Label1" runat = "server" Style=" font-family:Verdana; font-weight:lighter; font-size:small"
Text=' <%# DataBinder.Eval(Container.DataItem, "DescriptionStatic")%>'>

</td>
</p>
</td>
</tr>
</table>
<table id="Table7" style=" margin-top:-40px; font-weight:lighter" width="200px" visible ="true">
<tr>
<td >
<p align="left" style=" font-family:Verdana; font-size:smaller; font-weight:normal;">
<br />

Each pack:
<asp:Label ID="Label2" runat = "server" Style=" font-weight:lighter "
Text=' <%# DataBinder.Eval(Container.DataItem, "DespatchCounts") %>' >


<footertemplate>
<asp:Button ID="BtnCheckOut" runat = "server" Text='Checkout' Enabled="false"
Width="100px" onclick="CheckOutBtn_Click"
style="z-index: 1; width:80px;cursor:pointer; margin-left:350px ; font-family:Arial; text-align:center; height:22px; font-weight:600; " >

<br />
<asp:Button ID="Button1" runat = "server" Text='About us' CausesValidation="false"
Width="100px"
style="z-index: 1; width:80px;cursor:pointer; margin-top:10px; margin-left:20px ; font-family:Arial; text-align:center; height:22px; font-weight:normal; font-size:smaller " >
[no name] 1-Dec-13 9:37am    
for the love of god and my eyes edit your question and put it into a code block PLEASE!

1 solution

I may be able to relate your problem to a problem that I was having a few years ago with C++ windows forums application. I was loading pictures into the background and manipulating them. Every time I manipulated them the pictures would flicker, every time I moved the forum around on the screen the picture would flicker. I found out that this was caused by the image quality being to high and my GPU not being able to update the picture fast enough causing a flicker. To verify that this is the problem replace the picture with a small 1-2kb png file and see if it still flickers. If it doesn't then your picture quality is two high. You can use the same picture but need to lower the size. You can go to http://www.imageoptimizer.net/Pages/Home.aspx[^] and reduce the file size to stop the flickering.
 
Share this answer
 
Comments
S.Rajendran from Coimbatore 1-Dec-13 10:51am    
All the images are 5kb size only

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900