How I can use the UpdateProgress Control to show a wait symbol? - c#

I have an ASP.NET application with a ListView. I get data from Active Directory and now I want a wait symbol for the time if the ListVew is building. I thought I would use a UpdateProgress Control from Ajax Control toolkit. But I don't know how I can use it if I click on a Button and the wait symbol (for example a gif) closes if the ListView is finished. :(
My CS file:
protected void btnBenutzerSuchen_Click(object sender, EventArgs e)
{
//If I click on this Button the gif must start
try
{
... // my ListView get data
this.myListView.DataSource = dv;
this.myListView.DataBind();
...
}
catch (Exception)
{
...
}
//If the ListView is finish the gif must close
}
How I can do this? Can I do this with the UpdateProgress like this:
<asp:UpdateProgress ID="UpdateProgress1" DynamicLayout="true" runat="server" AssociatedUpdatePanelID="?" >
<ProgressTemplate>
<div class="progress">
<img src="images/ajax-loader-arrows.gif" /> please wait...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
My update.aspx file:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="~/BenutzerListe.aspx.cs" Inherits="BenutzerListe.BenutzerListe" %>
<%# Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%>
<!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">
<head runat="server">
<title></title>
<script src="Scripte/jquery-1.7.2.js" type="text/javascript"></script>
<script type="text/javascript" src="Scripte/jquery-ui-1.8.22.custom.min.js" ></script>
<script language="javascript" type="text/javascript">
// my javascript code
</script>
<link href="~/App_Theme/BenutzerListeStyle.css" type="text/css" rel="Stylesheet" />
<link href="App_Theme/jquery-ui-1.8.22.custom.css" type="text/css" rel="Stylesheet" />
<link href="App_Theme/PopUpDialog_Style.css" type="text/css" rel="Stylesheet" />
<style type="text/css">
#SuchTabelle
{
width: 587px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:scriptmanager id="ScriptManager1" runat="server">
</asp:scriptmanager>
<div class="header">
<br />
<table id="SuchTabelle" class="SuchTabelle" runat="server" border="0" width="100%">
<tr>
<th><asp:Label ID="id_SearchUser" runat="server" Text="lblSearchUser"></asp:Label></th>
<th class="txtBenutzerSuchen"><asp:TextBox ID="txtBenutzer" runat="server" Width="150px" ToolTip="Gesucht wird nach Vorname, Nachname, eMail , Abteilung und Telefonnummer"></asp:TextBox></th>
<th><asp:Label ID="id_location" runat="server" Text="lblLocation"></asp:Label></th>
<th class="DropDownList"><asp:DropDownList ID="dropWerk" runat="server" Width="200px" /></th>
<th>
<asp:Button ID="Button2" runat="server" Text="Suchen" onclick="btnBenutzerSuchen_Click" Width="150px"/>
</th>
</tr>
</table>
</div>
<div class="bodyList">
<asp:UpdatePanel ID="update" runat="server">
<ContentTemplate>
<asp:ListView> .... </asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="updatePro" DynamicLayout="true" runat="server" AssociatedUpdatePanelID="update">
<ProgressTemplate>
<asp:Image ImageUrl="~/App_Theme/ajax_loader_circle.gif" runat="server" ID="waitsymbol" />
</ProgressTemplate>
</asp:UpdateProgress>
<hr />
</div>
</form>
</body>
</html>

First place your listview aspx code inside an update panel
<asp:UpdatePanel ID="up" runat="server">
<ContentTemplate>
// Place your list View Code here
<asp:ListView ..........
...... </asp:ListView>
</ContentTemplate>
<Triggers>
// If button is present outside update panel then specify AsynPostBackTrigger
<asp:AsyncPostBackTrigger ControlID="btnControlID" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
// Now Set AssociatedUpdatePanelID="up" in the UpdateProgress
<asp:UpdateProgress ID="UpdateProgress1" DynamicLayout="true" runat="server" AssociatedUpdatePanelID="up" >
<ProgressTemplate>
<div class="progress">
<img src="images/ajax-loader-arrows.gif" /> please wait...
</div>
</ProgressTemplate>
</asp:UpdateProgress>

Try to put your button within an UpdatePanel that contains the code may take a long time to execution, then associate the UpdateProgress control to the UpdatePanel. Code you may need is just like:
<asp:UpdatePanel ID="updatePanelMain" runat="server">
<ContentTemplate>
<asp:button runat="server" ID="btnBenutzerSuchen" OnClick="btnBenutzerSuchen_Click"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updatePanelMain" DisplayAfter="200">
<ProgressTemplate>
<div class="progress">
<img src="images/ajax-loader-arrows.gif" /> please wait...
</div>
</ProgressTemplate>
</asp:UpdateProgress>

I did a small example simulation a button click within an updatePanel. Pay attention to the attribute AssociatedUpdatePanelID which must be set, in order to show your progressTemplate.
default.aspx
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btnDoSomething" runat="server" Text="Do Something"
onclick="btnDoSomething_Click" />
<asp:ListView> YOUR_LISTVIEW_GOES_HERE </asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" DynamicLayout="true" runat="server"
AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<div class="progress">
<img src="images/ajax-loader-arrows.gif" /> please wait...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
default.aspx.cs
protected void btnDoSomething_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
// or update listView
}

Show Progress Bar Using UpdateProgress Control in Asp.net
Refer This Link for more information
http://www.freshcodehub.com/Article/22/show-progress-bar-using-updateprogress-control-in-aspnet
<asp:UpdateProgress ID="prgLoadingStatus" runat="server" DynamicLayout="true">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<asp:Image ID="imgWaitIcon" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/img/progress.gif"
Width="230px" /><br />
Please wait...
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btnProgress" runat="server" Text="Show Progress" OnClick="btnProgress_Click" />
</ContentTemplate>
</asp:UpdatePanel>

Related

Upload file control not showing any file in the code behind

I have a very simple application. I am trying to upload the file using File upload control of ASP.net. Below is my entire .cs code and .aspx code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TestFileUpload1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void uploadFile_Click(object sender, EventArgs e)
{
if (UploadImages.HasFiles)
{
foreach (HttpPostedFile uploadedFile in UploadImages.PostedFiles)
{
uploadedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/Images/"), uploadedFile.FileName));
//listofuploadedfiles.Text += String.Format("{0}<br />", uploadedFile.FileName);
}
}
}
}
}
My .aspx code:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestFileUpload1.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test web site</title>
<script src="Scripts/jquery-1.11.0.js"></script>
<script src="Scripts/jquery.mobile-1.4.5.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div>
<asp:FileUpload runat="server" ID="UploadImages" AllowMultiple="true" />
<asp:Button runat="server" ID="uploadedFile" Text="Upload" OnClick="uploadFile_Click" />
<asp:Label ID="listofuploadedfiles" runat="server" />
</div>
</div>
</form>
</body>
</html>
whenever I try to upload a file, I get "False" for UploadImages.HasFiles.
Above is full working example.
As soon as I remove one of these script tags :
<script src="Scripts/jquery-1.11.0.js"></script>
<script src="Scripts/jquery.mobile-1.4.5.js"></script>
my code starts working and I get "true" for UploadImages.HasFiles when I try to upload a file.
I am using .net framework 4.7.2
I need to keep these two script tags in my code because of the GUI and this is an old application where these tags are used in all the pages.
I also tried to wrap the control in a update panel and that didn't work either. below is the changed .aspx page. although, I want my original code to work. I don't want to use ajax, but I just tried to use it because it is suggested as one of the solution
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestFileUpload1.WebForm1" %>
<%--<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp"%>--%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test web site</title>
<script src="Scripts/jquery-1.11.0.js"></script>
<script src="Scripts/jquery.mobile-1.4.5.js"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:FileUpload runat="server" ID="UploadImages" AllowMultiple="true" />
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="uploadedFile" />
</Triggers>
</asp:UpdatePanel>
<asp:Button runat="server" ID="uploadedFile" Text="Upload" OnClick="uploadFile_Click" />
<asp:Label ID="listofuploadedfiles" runat="server" />
</div>
</div>
</form>
</body>
</html>
below is the image of false value that I am getting in code behind:
Any help will be highly appreciated.
All I had to do is put data-ajax ="false" in form tag and that fixed the issue.
<form id="form1" runat="server" data-ajax ="false">
Use a update panel and wrap your controls inside it. Then add the button controlID as a trigger (be sure its a PostBackTrigger) to the update panel. To test be sure to put a break point on the uploadFile_Click event so you can step through and see the values..
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:PostBackTrigger ControlID="btnSignaureOfRequestor" />
</Triggers>
<ContentTemplate>
<table>
<tr> <td class="tdText" colspan="4">
<asp:FileUpload ID="fileUpload" runat="server" Width="50%" />
</td>
</tr>
<tr>
<td> <asp:Button ID="btnSignaureOfRequestor" runat="server" Text="Submit Request" Visible="true" OnClientClick="return confirm('Are you sure you want to continue?');" OnClick="btnSignaureOfRequestor_Click" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
Try the below, removed allow multiple and add update mode conditional (see confirm case/syntax of these changes as I'm just writing it in notepad)
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" updateMode="Conditional">
<ContentTemplate>
<asp:FileUpload runat="server" ID="UploadImages" />
<asp:Button runat="server" ID="uploadedFile" Text="Upload" OnClick="uploadFile_Click" />
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="uploadedFile" />
</Triggers>
</asp:UpdatePanel>
<asp:Label ID="listofuploadedfiles" runat="server" />
</div>
</div>

Update panel asp.net - page refresh

Page url: http://advancedmedia.co.il/data.aspx
Code:
<asp:Content ID="Content2" ContentPlaceHolderID="page_content_cp" Runat="Server">
<asp:UpdatePanel runat="server" ID="UP1" UpdateMode="Conditional">
<ContentTemplate>
<section id="page_section">
<div class="data_top">
<ul class="bxslider">
<asp:ListView ID="LV_slider" runat="server" DataSourceID="**">
<ItemTemplate>
<li>
<asp:Image ID="Image11" ImageUrl='<%#XPath("big_image_url") %>' AlternateText="slider" runat="server" />
</li>
</ItemTemplate>
</asp:ListView>
</ul>
</div>
<div class="shaddow"></div>
<div class="data_bottom">
<asp:ListView runat="server" ID="LV_data_bottom" DataSourceID="**">
<ItemTemplate>
<div style="display:inline;">
<asp:LinkButton runat="server" CommandArgument='<%#XPath("big_image_url") %>' ID="LB_thumb" OnClick="lb_thumb1" ><asp:Image runat="server" ID="IMG_img1" ImageUrl='<%#XPath("small_image_url") %>' />
<asp:Label runat="server" CssClass="title" ID="bottom_label" Text='<%#XPath("title") %>'></asp:Label></asp:LinkButton>
</div>
</ItemTemplate>
</asp:ListView>
</div>
</section>
</ContentTemplate>
</asp:UpdatePanel>
<asp:XmlDataSource ID="**" runat="server"
DataFile="~/***/***" XPath="/Data/**/**">
</asp:XmlDataSource>
</asp:Content>
Click on the thumbs "jump" the page.
I dont want the page will "jump"/"refresh" after click on thumb. how can i do that? Maybe i wrong on the place of the updatepanel ?
You can always get it done using updatepanel and microsoft ajax... but there is a better and more lightweight alternative. Use jquery to swap the main image on top when the thumbnails are clicked, without doing a page refresh.
Define a surrounding div for the imain image with id "imageBox"
<img class="thumb" src="image1_thumb.jpg" />
<div id="imageBox"> </div>
then,
$(document).ready(function(){
$('#changeImage').click(function(){
var rel = $(this).attr('rel');
$("#imageBox").html("<img src='image" + rel + ".jpg' />");
})
});
This is both clean and lightweight. no Microsoft ajax panel junk.
I'm not sure about what is your problem here, but if you want to separate the Update Panel into two you can do so.
There's an explanation on how different update panels can trigger themselves.
http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers
Used AutoPostBack="false" in listview page can't be refresh ..or used javascript to change the image
Put ScriptManager.
<asp:ScriptManager EnablePartialRendering="true"
ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Content ID="Content2" ContentPlaceHolderID="page_content_cp" Runat="Server">
<asp:UpdatePanel runat="server" ID="UP1" UpdateMode="Conditional">
<!-- bla bla bla.. -->
Did you try to change the following
UpdateMode="Conditional"
With this?
UpdateMode="Always"
Set ClientIDMode=Auto on the LinkButton.
Everything seems correct.
Here is a sample for Update panel.
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
Code Behind
namespace WebApplication3
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = "change Test 1";
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
this.Label1.Text = "change Test 2";
}
}
}

The UpdatePanel doesn't work with button

I had my code to insert values into DB and after the data inserted the
ModalPopupExtender show and when click on OK button event fire to
reload the page . but I don't want all paged reload I tried to use
update panel but the OK event doesn't work .
<asp:Panel ID="PostPanel" runat="server" Style="display: none;">
<div class="modalPopup">
<div class="PopupBody">
<p class="ads-text">
GO </p>
</div>
<div class="Controls">
<div class="post">
<asp:Button Text="OK" runat="server" ID="btnOkay" ValidationGroup="AddUserpopup"
OnClick="btnOkay_Click" />
</div>
</div>
</div>
</asp:Panel>
<cc1:ModalPopupExtender ID="ModelExtenderPost" OkControlID="btnOkay" runat="server"
TargetControlID="HiddenField22" PopupControlID="PostPanel" PopupDragHandleControlID="PopupHeader"
Drag="true" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:HiddenField ID="HiddenField22" runat="server" />
protected void btnOkay_Click(object sender, EventArgs e)
{
Response.Redirect(Request.Url.ToString(), true);
}
use updatepanel that is in asp.net
in top of your page :
<%# Page Title="" Language="C#" MasterPageFile="~/..." EnableEventValidation="false" AutoEventWireup="true" ....
and for ypur panel:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode= "Conditional">
<ContentTemplate>
<div class="modalPopup">
<div class="PopupBody">
<p class="ads-text">
GO </p>
</div>
<div class="Controls">
<div class="post">
<asp:Button Text="OK" runat="server" ID="btnOkay" ValidationGroup="AddUserpopup"
OnClick="btnOkay_Click" />
</div>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnOkay" EventName ="Click" />
</Triggers>
</asp:UpdatePanel>

Update Panel not working properly causing full postback

I have moved to visual studio 4.5 and at first my update panels worked just fine but one day they just seemed to stop altogether even if I start a new project.
Code Behind:
public partial class TestPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
Label1.Text = "Post Back";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Testl.Text = DateTime.Now.ToString();
UpdatePanel1.Update();
}
}
Page:
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:Label ID="Label1" runat="server" ></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Label runat="server" ID="Testl"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
even this code causes a post back and I cannot for the life of me figure out why. Here are my references in case I may be missing one I do not realize.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
I have it running in a scriptmanager in my masterpage.
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="UFODataRepositoryWebApplication.SiteMaster" %>
<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
<meta charset="utf-8" />
<title></title>
<asp:ContentPlaceHolder runat="server" ID="HeadContent" />
</head>
<body>
<form runat="server" id="MainForm">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<header>
<div class="content-wrapper">
<div class="float-right">
<div id="MainLogin_Div">
<div class="fb-login-button" data-show-faces="true" data- width="400" data-max-rows="1"></div>
<asp:UpdatePanel ID="MainLogin_UpdatePanel" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Panel ID="UnLoggedMain_Panel" runat="server" Visible="true">
<p>
<asp:LinkButton runat="server" PostBackUrl="Login.aspx" CssClass="NotLoggedMenu"
ID="MainLogin_Link">Login</asp:LinkButton>
<span style="color: #7E7F7F;">or </span>
<asp:LinkButton runat="server" PostBackUrl="Register.aspx" CssClass="NotLoggedMenu"
ID="MainRegister_Link">Become a member</asp:LinkButton>
</p>
</asp:Panel>
<asp:Panel ID="LoggedMain_Panel" ClientIDMode="Static" runat="server" Visible="false">
<span style="color: #CACCCB;">Welcome: </span>
<asp:LinkButton ID="Welcome_LinkButton" ClientIDMode="Static" runat="server" PostBackUrl="~/UserPanel.aspx"></asp:LinkButton>
<asp:LinkButton ID="MainLogout_LinkButton" runat="server" OnClick="MainLogout_User"> Logout</asp:LinkButton>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ul>
</div>
</div>
</header>
<div id="body">
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
</div>
</form>
</body>
</html>
So that should be literally all the code I have. I intentionally took out the inherits at the top of the page for this post.

asp:Button execute problem in IE

<asp:Button ID="btnFind" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, SearchButtonText %>" CssClass="submit"
OnClick="btnFind_Click" ValidationGroup="TopSearch" />
but btnFind_Click never executed in IE. It work in FF and in Opera. Problem is only in IE. Maybe anyone know where can be problem that btnFind_Click can not executed when i click on it?
EDIT:
i figure out that asp:linkbutton works, problem is only in asp:button
EDIT 2:
code:
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="SearchPage.master.cs"
Inherits="ViaMura.Web.MasterPage.SearchPage" %>
<!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">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<asp:ContentPlaceHolder ID="cpDescription" runat="server">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="cpKeywords" runat="server">
</asp:ContentPlaceHolder>
<meta name="copyright" content="© 2010 viamura.si" />
<meta name="robots" content="index,follow" />
<meta name="rating" content="General" />
<link href="~/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="~/css/results.css" rel="stylesheet" type="text/css" media="screen" />
<link href="~/css/map.css" rel="stylesheet" type="text/css" media="screen" />
<link href="~/css/weather.css" rel="stylesheet" type="text/css" media="screen" />
<link href="~/css/sexyalertBox.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="/js/jQuery/jquery.1.3.1.min.js"></script>
<script type="text/javascript" src="/js/jQuery/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="/js/jQuery/jquery.sexyalertbox.1.2.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/animatedCollapse.js"></script>
<script type="text/javascript" src="/js/jQuery/jquery.ajaxConten.2.1.js"></script>
<asp:Literal ID="litIE6" runat="server" Text=""></asp:Literal>
<asp:ContentPlaceHolder ID="cpHead" runat="server">
</asp:ContentPlaceHolder>
</head>
<body onload="load();">
<form id="form1" runat="server" DefaultButton="btnFind">
<asp:ScriptManager ID="smSearchPage" runat="server" EnablePageMethods="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="upnDefault" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Literal ID="litHiddenFields" runat="server"></asp:Literal>
<div id="top_menu">
<asp:HyperLink ID="hlHome" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, HomeTopButtonText %>" NavigateUrl="~/Default.aspx"></asp:HyperLink>
· <asp:HyperLink ID="hlAddSite" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, AddSiteTopButtonText %>" NavigateUrl="~/EnterSite.aspx"></asp:HyperLink>
· <asp:HyperLink ID="hlAbout" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, AboutTopButtonText %>" NavigateUrl="~/About.aspx"></asp:HyperLink>
· <asp:HyperLink ID="hlHelp" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, HelpTopButtonText %>" NavigateUrl="~/Help.aspx"></asp:HyperLink>
· <asp:HyperLink ID="hlMarketing" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, MarketingTopButtonText %>" NavigateUrl="~/Marketing.aspx"></asp:HyperLink>
· <asp:HyperLink ID="hlInfo" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, InfoTopButtonText %>" NavigateUrl="~/Info.aspx"></asp:HyperLink>
</div>
<div id="search_container">
<a id="logoLink" runat="server"><img src="/images/results_logo.png" class="image" alt="viamura" /></a>
<div id="search">
<div id="tabs">
<ul>
<li>
<div ID="btnWebL" runat="server" class="left_selected"></div>
<asp:LinkButton ID="btnWeb" runat="server" CssClass="center_selected" OnClick="btnWeb_Click"
Text="<%$ Resources:ViaMura.Web.Default, WebSearchButtonText %>"></asp:LinkButton>
<div ID="btnWebR" runat="server" class="right_selected"></div>
</li>
<li>
<div ID="btnMapL" runat="server" class="left"></div>
<asp:LinkButton ID="btnMap" runat="server" CssClass="center" OnClick="btnMap_Click"
Text="<%$ Resources:ViaMura.Web.Default, MapSearchButtonText %>"></asp:LinkButton>
<div ID="btnMapR" runat="server" class="right"></div>
</li>
<li>
<div ID="btnWeatherL" runat="server" class="left"></div>
<asp:LinkButton ID="btnWeather" runat="server" CssClass="center" OnClick="btnWeather_Click"
Text="<%$ Resources:ViaMura.Web.Default, WeatherSearchButtonText %>"></asp:LinkButton>
<div ID="btnWeatherR" runat="server" class="right"></div>
</li>
<li>
<div ID="btnImagesL" runat="server" class="left"></div>
<asp:LinkButton ID="btnImages" runat="server" CssClass="center" OnClick="btnImages_Click"
Text="<%$ Resources:ViaMura.Web.Default, PicturesSearchButtonText %>"></asp:LinkButton>
<div ID="btnImagesR" runat="server" class="right"></div>
</li>
<li>
<div ID="btnConverterL" runat="server" class="left"></div>
<asp:LinkButton ID="btnConverter" runat="server" CssClass="center" OnClick="btnConverter_Click"
Text="<%$ Resources:ViaMura.Web.Default, ConverterSearchButtonText %>"></asp:LinkButton>
<div ID="btnConverterR" runat="server" class="right"></div>
</li>
</ul>
</div>
<img src="/images/bg_search_med_left.png" align="left" alt="<" /><asp:TextBox ID="txtFind"
runat="server" CssClass="search" ValidationGroup="TopSearch"></asp:TextBox>
<img src="/images/bg_search_med_right.png"
align="left" alt=">" />
<asp:LinkButton ID="btnFind" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, SearchButtonText %>" CssClass="submit"
OnClick="btnFind_Click" ValidationGroup="TopSearch" />
<div class="validation_error">
<asp:RequiredFieldValidator ID="rfvtxtFind" runat="server"
ErrorMessage="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, RequiredFieldTextOnSearchButton %>" ControlToValidate="txtFind" CssClass="validator"
ValidationGroup="TopSearch" Display="Dynamic"></asp:RequiredFieldValidator>
</div>
</div>
<div id="hints">
<asp:Literal ID="litSuggestedForms" runat="server"></asp:Literal>
</div>
<hr />
</div>
<div id="results">
<asp:ContentPlaceHolder ID="cplResults" runat="server">
</asp:ContentPlaceHolder>
<div id="results_search">
<img src="/images/bg_search_sml_left.png" align="left" alt="<" /><asp:TextBox ID="txtSmallSearch"
runat="server" CssClass="search" ValidationGroup="BottomSearch"></asp:TextBox>
<img src="/images/bg_search_sml_right.png" align="left" alt=">" />
<asp:Button ID="btnSmallFind" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, SmallSearchButtonText %>"
CssClass="submit" onclick="btnSmallFind_Click" ValidationGroup="BottomSearch" />
</div>
<div class="validation_error">
<asp:RequiredFieldValidator ID="rfvtxtSmallSearch" runat="server"
ErrorMessage="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, RequiredFieldTextOnSmallSearchButton %>" ControlToValidate="txtSmallSearch"
ValidationGroup="BottomSearch" Display="Dynamic"></asp:RequiredFieldValidator>
</div>
</div>
<div id="sidebar">
<asp:Repeater ID="rptItems" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<div class="item">
<img src='<%#GetImage(Eval("idAdvertisementCompanies"))%>' ID="imageSrc" runat="server" height='<%# Convert.ToInt32(Eval("Height"))%>' width='<%# Convert.ToInt32(Eval("Width"))%>' alt="img" align="left" />
<p class="name"><asp:Label ID="lblName" runat="server" Text='<%#Eval("Name")%>'></asp:Label></p>
<p><asp:Label ID="lblDescription" runat="server" Text='<%#Eval("Description")%>'></asp:Label></p>
</div>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
<div class="item" style="border: none; margin: 0;">
</div>
<div class="top_search">
<h2><asp:Label ID="lblPaidMostPopularSearches" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, FrequentlySearchedQueriesText %>"></asp:Label></h2>
<ul>
<asp:Literal ID="litPaidMostPopularSearches" runat="server"></asp:Literal>
</ul>
</div>
<div style="clear: both; "></div>
<br /><br />
<div class="top_search">
<h2><asp:Label ID="lblPaidTopSearches" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, PaidTopSearchesText %>"></asp:Label></h2>
<ul>
<asp:Literal ID="litPaidTopSearch" runat="server"></asp:Literal>
</ul>
</div>
</div>
<div id="footer">
<div>
<% /*<asp:LinkButton ID="lbSlo" runat="server" CssClass="slo"
Text="" onclick="lbSlo_Click"></asp:LinkButton>
<asp:LinkButton ID="lbDeu" runat="server" CssClass="deu"
Text="" onclick="lbDeu_Click"></asp:LinkButton>
<asp:LinkButton ID="lbAus" runat="server" CssClass="aus"
Text="" onclick="lbAus_Click"></asp:LinkButton>*/ %>
</div>
<asp:HyperLink ID="hlInfoButtomLink" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, InfoButtomLinkText %>" NavigateUrl="~/Info.aspx"></asp:HyperLink>
·
<asp:HyperLink ID="hlAboutButtomLink" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, AboutButtomLinkText %>" NavigateUrl="~/About.aspx"></asp:HyperLink>
·
<asp:HyperLink ID="hlMarketingButtomLink" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, MarketingButtomLinkText %>" NavigateUrl="~/Marketing.aspx"></asp:HyperLink>
<br />
<asp:Literal ID="litFooter" runat="server" Text="<%$ Resources:ViaMura.Web.MasterPage.SearchPage, FooterText %>"></asp:Literal>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3307705-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
Execution of code is browser independent, unless you have code that executes differently according to some user variable such as user agent.
So the problem is highly likely to not be on the server side.
Take a look at any Javascript you have that IE might be blocking the post for some reason. If there are script errors on the page, it can cause this possibly.
Take a look at this link : DoPostBakcWithOptions
The problem could be the js function WebForm_DoPostBackWithOptions served by the WebResource.axd and for some reason the HTTPModule could interfere with the handler.
Try to remove the HTTPModule and check if the button do PostBack.
found solution if anyone has similar problem. IE and opera have problems when you have more than 1 form and they don't know which one execute. STRANGE IE!!!
LINK where i found help: http://forums.asp.net/t/1035522.aspx/1?Submit+buttons+not+working+in+IE

Categories

Resources