Web Forms :: Disable A Button For A While?
Nov 2, 2010i have a button and would like when its clicked that it disaple for a minute then returns to normal how can i do that
View 4 Repliesi have a button and would like when its clicked that it disaple for a minute then returns to normal how can i do that
View 4 RepliesI have four Imagebuttons that I want to disable depending on the Role the user belongs too. I know how do do this in a gridview or detailsview but for some reason it isn't working on just a plain form. So when a User who is not in the "Admin" role logs onto the page he either doesn't see the button or the hyperlink has been disabled thus not allowing him to proceed any further.
View 6 Replies[Code]....
View 2 RepliesIn one of my Web Page, there is one Modal Pop up, in which I am using Gridview Edit, Update, CancelEdit, Delete functionality.Main functionality is : If while deleting any of the Gridview Row, if only 1 row remains in Gridview (that row can be any row), then that row should not get deleted.Rest of Edit, Update, CancelEdit functionally is working fine.
I used below code for above:
C#:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindGrid();
[Code]....
problem is: When any last row is left in Gridview, its Delete button is disables that time (as per requirement and functionality). But when user clicks on Gridview "Edit" button, update section opens, and at that time "Delete" button gets Enabled, so that time user can delete the last row of Gridview which should not be done.I had fixed this problem for "Cancel" and "Update" button of Gridview using below line:
Response.Redirect(Request.Url.AbsoluteUri); but unable to fix it for "Edit" button of Gridview. If Last row is left in Gridview , and user clicks on Gridview "Edit" button of that row, then at that time "Delete" button should not get "enabled" it should remain "disabled"
I am currently doing asp.net page, I want disable back & forward button all the times the page opening/loading.
View 4 RepliesMy customer has a website that is unsuitable for children. Anyone under 18 is not allowed ont he site. No, it's not a porn site, it's prison related. A certain page requires the user to enter their birthdate. If they are under 18, they're redirected to another site.
He has another site written for kids who have been impacted by crime. He wants the kids redirected here, to a page that explains why they were redirected. He asked me to disable the back button at this point to keep the kids from easily going back to the original site.
I've read all the reasons why you shouldn't desable the back button, but frankly, I think this would an appropriate place to do it. I also know you really can't disable it, but I've found a number of work arounds - none of which I've gotten to work.
Is there a work around that will work?
I've thought of setting a session variable or a hidden field or an invisible label on the page that redirects the kids just before the redirect and checking the value at page load, but the code to do the checking doesn't get run unless the user hits the back button then refreshes the page. Is there a way to get code to run as soon as the back button is pressed?
When Iam tring to disable a Link button, It is working fine in IE8.
But when I check for compatability the button is still enabled.
I have this below piece of code which fires on second time but not first time for me. I am using it as a login button checking for Username n password validations.
I don't want to use javascript:
[Code]....
Can I use requiredfieldvalidator apply to a tex box, txtOrderby, if txtOrderby is empty then set button1.enable = false?
View 2 RepliesI have a button whose sole purpose is to set div.visible = true
There is a calendar control on my page and I need the selected date to remain selected after I hit this button. Right now if I hit the button it refreshes the whole page and sets the calendar's selected day back to date.
I have a shopping basket on my site, and when the customer gets to the final page I don't won't them to be able to go back i.e. use the back button on the explorer. I have seen it before on other web sites, it's like when you leave the page it 'times out'I am just not sure how that works.
View 5 RepliesHow to disable back and refresh button. I want to know how this can be handled as in bank websites and other secured websites. Can this be handled using clearing cache in Response object?
View 8 RepliesI have a form with client side validation. I need to disable sumbit button on click to prevent duplicates
[Code]....
[Code]....
When I use this script all client side validations get skipped.
Is it possible to disable button and have the validation working?
i want the submit button be disable after user click one time , i meant i want 1 user has rights to submit onetime only in a day .
View 11 Repliesi want disable button at process time for that i am using this code at page_load event
System.Text.StringBuilder sbValid = new System.Text.StringBuilder();
sbValid.Append("if (typeof(Page_ClientValidate) == 'function') { ");
sbValid.Append("if (Page_ClientValidate() == false) { return false; }} ");
sbValid.Append("this.value = 'Please wait...';");
sbValid.Append("this.disabled = true;");
sbValid.Append("document.all.btnSubmit.disabled = true;");
//GetPostBackEventReference obtains a reference to a client-side script function that causes the server to post back to the page.
sbValid.Append(this.Page.GetPostBackEventReference(this.btncod));
sbValid.Append(";");
this.btncod.Attributes.Add("onclick", sbValid.ToString());
but when i used this button is disable but not going at onclick event
how do i disable the back button in a website?
View 3 RepliesI was trying to disable button after it is clicked once. But I am not sure where I was going wrong. On click of Ok, I am trying to navigate back from ascx to aspx page.
[Code]....
I have an application that I am working on that is a time keeping site. I will use it to track the clock-in/out times of the employees. I have 2 buttons on a page. One that says clock-in and the other says clock-out.
I want the clock-in button to be disabled if the user has not clocked-out and the clock-out to be disabled if the user hase not clocked-in.
I'm using MSSQL 2005 and VB.
i have 3 buttons in an aspx page. one for "Save as Draft", 2nd for "Cancel" and 3rd for "submit". Now i want that whenever i click on any of the 3 buttons then all the 3 buttons should get disabled. I'm using c# for the above
<asp:Button ID="btncancel" runat="server" style="font-family: 'Segoe UI'; font-size: small"
Text="Cancel" Width="62px" onclick="btncancel_Click" />
<asp:Button ID="btnsave" runat="server" style="font-family: 'Segoe UI'; font-size: small"
Text="Save as Draft" Width="84px" onclick="btnsave_Click" />
<asp:Button ID="btnsubmit" runat="server" onclick="btnsubmit_Click" UseSubmitBehavior="false"
OnClientClick=" if ( Page_ClientValidate() ) { this.disabled = true; this.value='Please wait..';}"
style="font-family: 'Segoe UI'; font-size: small" Text="Submit"
ValidationGroup="Initiator" Width="90px" />
After user has logged out i am redirecting user to home.aspx and from here i do not want user to be able to go back using browser back button.. How can i do it? I used this code in javascript :
<script type="text/javascript"> javascript:window.history.forward(1);</script>
This does not work for me. In all pages i am using Master Pages..
I use following code to disable browser back button but it not work
<script type = "text/javascript" >
function preventBack(){window.history.forward();}
setTimeout("preventBack()", 0);
window.onunload=function(){null};
</script>
How can i disable it.
My problem is when I logout from my website, the logout button redirects to login page , and then if I click BACK button in browser, I can go back to my website. I do not want that.
What I am actually trying to make is like at mail.yahoo.com or at mail.google.com after sucessful logout user cannot view the account.
I would like to make the same functionality for my application.
I have Query
I am designing new website
I want to know how I came to knoe whether user is logged in or not so that i can make visible log out button on MAster PAge
I am able to log in but my log out button is not visible since after successfully login i am getting log in button visible and How to store value in session ("UI") ?
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Session("UI") Is Nothing Then
Logoutbutton.Visible = True
LoginButton.Visible = False
Displayprofile.Visible = True
Displayprofile.Text = "USER profile"
Else
Alert.Show("no session")
LoginButton.Visible = True
Displayprofile.Visible = False
End If
end Sub
"how to disable browser close button" ,i am handling close button functionality with another button ?
View 1 RepliesI am using two text boxes for email id and password,and a submit button inoreder to login.In the same page itself I have provided a link button for forgot password.For the two text boxes I have provided required field validators.So when I click on the Link "Forgot Password" I cannot move to other page since the requiredfield validators prevent thatr.
View 1 Replies