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

ClickOnce Button?

Hi,

I have an ASP.NET 2.0 application with Master Pages and I would to make a
WebContols.Button to be disabled on the client side when the user pressed on
it so he will not be able to mistakably press it again before the server has
done processing his request.

How can it be done?

Regards,
Asaf

Sep 7 '06 #1
4 1278
Hi,
>
I have an ASP.NET 2.0 application with Master Pages and I would to make a
WebContols.Button to be disabled on the client side when the user pressed on
it so he will not be able to mistakably press it again before the server has
done processing his request.

How can it be done?

Regards,
Asaf
like this maybe?
http://www.metabuilders.com/Tools/OneClick.aspx

Hans Kesting
Sep 7 '06 #2
Hello Hans,

Thanks for your reply but I am looking just to Disabled the button when the
user pressed it.

Regards,
Asaf
"Hans Kesting" wrote:
Hi,

I have an ASP.NET 2.0 application with Master Pages and I would to make a
WebContols.Button to be disabled on the client side when the user pressed on
it so he will not be able to mistakably press it again before the server has
done processing his request.

How can it be done?

Regards,
Asaf

like this maybe?
http://www.metabuilders.com/Tools/OneClick.aspx

Hans Kesting
Sep 7 '06 #3
Hi,

I understand that your webform takes long time to complete the postback and
you want the button caused the postback gets disabled after clicked, right?

I think you can use following code as an example:

----8<---- web form ----

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<!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>Untitled Page</title>
<script type="text/javascript" language="javascript">
function mypostback()
{
form1.button1.disabled = true;
form1.submit();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="button1" runat="server"
OnClientClick="mypostback();" Text="Submit" />
</div>
</form>
</body>
</html>

----8<---- code behind -----

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
System.Threading.Thread.Sleep(3000);
}
}
}

I hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 7 '06 #4
Hello Walter,

Thanks for your help.

Regards,
Asaf

"Walter Wang [MSFT]" wrote:
Hi,

I understand that your webform takes long time to complete the postback and
you want the button caused the postback gets disabled after clicked, right?

I think you can use following code as an example:

----8<---- web form ----

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<!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>Untitled Page</title>
<script type="text/javascript" language="javascript">
function mypostback()
{
form1.button1.disabled = true;
form1.submit();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="button1" runat="server"
OnClientClick="mypostback();" Text="Submit" />
</div>
</form>
</body>
</html>

----8<---- code behind -----

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
System.Threading.Thread.Sleep(3000);
}
}
}

I hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 7 '06 #5

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

Similar topics

5
by: Danny Tuppeny | last post by:
I've been playing around with ClickOnce today, and it's all good stuff. Except, that if I change my application to NOT be full trust (which seems to make very little difference to the user prompt,...
3
by: Asaf | last post by:
Hi, After publishing my test application using ClickOnce with VS.NET 2005 I am getting these warnings: Warning: Could not download 'ClickOnce.application' from… Warning: Could not download...
1
by: moondaddy | last post by:
I need to have multiple deployment profiles for a .net 2.0 winforms project. This is my requirement: 1) Re-use same project for multiple ClickOnce deployment profiles. 2) Each profile will...
7
by: hgirma | last post by:
Hello Gurus, Is it possible to schedule a task to run an application deployed using ClickOnce? The executable changes location with each update.. and if i were to run the executable directly,...
1
by: dongarbage | last post by:
ClickOnce almost does what I want. However, there are a couple of additional things I want to do with my application which I believe are a challenge with a ClickOnce application: 1. The...
1
by: Alexander Malapheev | last post by:
Hi, I have an asp.net application which has a button to launch ClickOnce application. This button open a new page which make redirect to ClickOnce app, something like this: Protected Sub...
4
by: Marc Gravell | last post by:
Repost from dotnet.general (no response), and OT but I hoped somebody might have a clue... I have a handful of ClickOnce installs that work fine almost everywhere... however, on some machines...
7
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
2
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I have installed my windows application that uses XpdfViewer (a COM Component for view Pdfs) using ClickOnce. But I get this error:
3
by: =?Utf-8?B?S2VuIExlbWlldXg=?= | last post by:
My clickonce app fails when the install button on the publish.htm page is clicked. User is prompted with a "Cannot Start Application" dialog. Details provided from the dialog are: PLATFORM...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.