Javascript - Good UI To Allow User To Revert Field To Default Value?

Feb 20, 2011

My web-based app allows users to override values in certain textboxes. If they don't override the value, the system will display (and use) a default.

I would like to support a scenario where the user has overridden the value, but now wants to revert back to the system default value, but doesn't know what value to enter. I would like to provide an intuitive UI for causing the system to revert the field's value back to its default.

Fields occur both on edit forms (where space is plentiful), as well as on edit grids (where space is scarce).

Requiring the user to clear the field is not an option, as sometimes the user's override is an empty value. Would rather not use a keystroke, like Ctrl-Z or ESC.

Best thing I can think of is the user hovers over the field and a popup displays giving the user the option to use the system default. I could use the same popup to capture/display a comment related to the override.

View 3 Replies


Similar Messages:

Web Forms :: Accessing Hidden Field From The User Control On Aspx Using Javascript

May 28, 2010

I have a user control that i have registered to an aspx page. Now from the aspx page, i am trying to access one of the registered usercontrol's hiddenfield value in my aspx page using javacript using the below code:

tst = document.getElementById('control1$hdnField').value;

I looked into the page's trace, and i could see 'control1$hdnField'. Then why i am not getting its value in my aspx page. I have also confirmed that the hidden field by this name exists in the user control and also has a default value set.

View 9 Replies

User Try To Expand Them The Web Page View Will Become Not So Good Because Every Treeview Has Expanded?

Jul 11, 2010

I have Already used many treeview in my web page, when any user try to expand them the web page view will become not so good because every treeview has expanded.how can I close every treeview when any user expand one of them?

View 12 Replies

Installation :: Revert To Previous Version Of .net Framework?

Jun 7, 2010

I think I did something stupid recently. I tried out the new vs2010 and probably changed settings to the newer version of the .net framework. My asp.net pages are working normally as before locally on my machine, but after I uploaded my web.config file to my ISP, the same pages are not working online.The version of asp.net my ISP has is 2.00.50727. I can upgrade that to 3.0 for an addional cost, but how do I revert back to my previous version, is this done in the wetb.config file perhaps?

View 3 Replies

Updating Web.config Revert Previous Updates

Apr 6, 2010

I've a SPJob Scheduled with a package (wsp) installation which update web.config and a Application Page which also build to update web.config. The problem is when I install the package it successfully update the web.config. I've confirmed the changes. Now, when we go to our Application Page which also successfully update the web.config but I lost the changes made during package installation.

View 1 Replies

Visual Studio 2010 - Revert .NET Pre-compilation?

Feb 24, 2011

I have created a web site, and i'll publish it... I wanna know if anyone who get access to my FTP and download my pre-compiled website can "revert" the DLL compilation, and re-create my code behinds!

View 3 Replies

SQL Server :: Set Bit Field Default Value?

Nov 23, 2010

I am trying to add a bit field with a default value of false to an existing table using VWD 2010 Express. With the allow nulls checkbox turned off and no data in the table, any value I attempt to enter into the default value box (0,(0), ((0)), False) all produce an error when exiting the field. What's the secret?

View 13 Replies

GridView - Update Row Command Does Not Revert Back To Display-only

Jan 19, 2010

I have a GridView that is populated from a LinqDataSource. When I update a row, the RowCommand fires and the change is persisted to the database, but the Grid does not refresh. I have it in an UpdatePanel and explicitely call Update() in the RowCommand handler, but there is no postback and the page just sits there in Edit mode. Once I click cancel, it will return to view-only and the grid shows the new value.

something in the wiring of the GridView regarding the data source is wrong. No exception bubbles up, though. A stripped-down copy of the markup is below.

[code]....

View 3 Replies

MVC :: Insert Default Value Into Html.Textbox Field?

Apr 1, 2010

I am new to .NET and MVC, so this is most likely a simple question: How can I have a default value appear for an Html.TextBox or TextArea field, for example if the code is currently - <%=Html.TextBox("ApplyToFax", Model.Competition.ApplyToFax, New With {.class = "regular", .maxlength = "50"})%>. I am looking to have a default fax number appear in the box when the page loads, for example (999) 999-9999.

View 5 Replies

How To Specify A Default Value For A Field In A .NET Details View Insert Mode

Jul 7, 2010

.NET newbie. I know there has to be a way to do this.I have a details view with it's default mode set to Insert. This is to be used as a form for users to enter records into a database. For two of the fields, I want to pre-populate the field with information. Specifically, I have a vb script with a few functions to query Active Directory to return the user's name based upon their user id. This script works fine.I call the functions for the user name like this:

<InsertItemTemplate>
<asp:TextBox ID="txtUserID" runat="server" Text='<%#CurrentUID() %>'></asp:TextBox>
</InsertItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="txtUserName" runat="server" Text='<%# GetUserName(CurrentUID()) %>'></asp:TextBox>
</InsertItemTemplate>

When the page loads, this populates the text boxes with the user id and the user name.But when the form is submitted, the values in the text boxes are not inserted in to the database.How can I set default values for the fields when the values come from functions?

View 1 Replies

Web Forms :: How To Set Default Current Date To Input Field

Jun 23, 2010

This may be a simple question but here it goes. I have an insert form that captures the current date of entry. What I would like to do is not cause the user to enter or select the current date but have it display on page load and capture to the field in the table on submit.I am rather new to ASP and am using Visual Web Studio 2008.

View 4 Replies

Change The Default Assignment Of Field In TreeView Control?

Jan 26, 2010

I have this code setup currently:

TreeView tree;
TreeNodeBinding treeNodeBinding = new TreeNodeBinding();
treeNodeBinding.TextField = "Name";
treeNodeBinding.DataMember = "Address";
treeNodeBinding.ValueField = "Zip";
treeNodeBinding.ToolTipField = "FileName1";
tree.DataBindings.Add(treeNodeBinding);
tree.DataSourceID = "Customers";
tree.DataBind();

The datasource (XML) may or may not have an optional attribute called IsPremium. If it exists, then I have to add custom business logic that determines what the treeNodeBinding.ToolTipField is going to be. The custom business logic will generate a string which needs to be set as the value of the ToolTipField.

View 1 Replies

Forms Data Controls :: How To Set A Field In DETAILS View To A Default Value

Aug 18, 2010

So question from a Newbie !So I have a web page with a Details View component for Inserting data into a table.One of the fields is a date/time which I want to be now().SO I guess there are 2 ways of doing it - either I populate the date/time field in the form with a variable that represent now() and make it Read Only so the user can't change it or I somehow make a hidden variable (ie not displayed in the form) that writes a date/time of now() into the database whenever an INSERT takes place.What is the best way and how do I do either of them ? How do I make one of the fields in the INSERT form of the Details View a preset variable ?

View 10 Replies

Forms Data Controls :: Default Value For GridView EditItemTemplate Field?

Feb 25, 2010

I have GridView with template column binded to some field. In edit mode I would like to set default value to this field when it is not initialized (this is time value and I would like to set it to default 8:00 - this prevent user from entering this value) - how to do this?

View 4 Replies

Web Forms :: Default Button Changing To First Focus While Entering Into Text Field?

May 17, 2010

I have just a form with several text boxes and two buttons one with next and anothe with previoues i have writtern code

<form id="Info" method="post" runat="server" defaultbutton="btnNext">
</form>

very first when the page loads the focus willl be on the next button, when i try to enter the text in the text box, focus changes from the next to the previous button (Previous button is the first button i have).

View 3 Replies

Assign A Hidden Field Value On Default.aspx Using BasePage Class Methods?

Nov 3, 2010

Is that possible? The reason why am doing this is because I need to parse that variable into a an JQuery function so I wanted JQuery to read that field. Can I Assign that value in base class or I have to do it within default.aspx pageload method?

View 1 Replies

State Management :: Hidden Field Value In User Control / Make The Hidden Field Save Its Value?

Mar 23, 2011

I have a custom user control which contains a asp hiddenfield object. The value of this hidden field is being set using javascript and I have verified that the value is being set properly. When a postback occurs the new value is not being saved and I cannot access it in my code.

I believe the problem is because the user control is not saved in viewstate and therefore the hidden field value is not saved accross postback. How can I make the hidden field save its value? I tried accessing it from the early page cycles and still no luck.

View 4 Replies

Javascript - Redirect Users To Default Page

Dec 2, 2010

I have an ASP.NET 3.5 intranet website which has a default page with a menu and when the user clicks on a menu item, I display the page for that menu item in an iframe embedded within the default page. but if the user types the URL of a page directly in the browser, then I would like to redirect him to the default page, because all the content pages do not have a menu. (Master Pages will solve this issue, but I can't use Master page here for a reason and don't want to go into those details). how to find out if user has arrived at the page directly by typing the URL or by clicking on the menu item, so that I can decide whether to redirect or not? Is this possible to find out? btw this is an intranet site and no login is required.

View 2 Replies

C# - Revert Database Permissions To "admin"?

Feb 12, 2011

I am having an unusual problem with MS SQL Server 2008 R2. My problem is a bit odd:

* Installed MS SQL and used in in my application. The app logs onto the server with the 'local Windows authentication'. Mixed mode is disabled.

* We had to rename our server. So now the 'local authentication' stops working. That's ok, because we use 'sa' in Mixed Mode as a temporary workaround.

* However, we can't seem to get back to 'local Windows authentication'. It seems that our newly created user account doesn't have full permissions. We checking pretty much every option, and can see things improving as we find the right permission tick boxes to click. However, we end up with problems as every so often a permission error occurs.

My question: What's the way to give 'god' permissions to a local role, or at least to revert it to the original permissions we have when the server was installed?

View 1 Replies

Gridview Hidden Field - How To Get A Hidden Field Value Using JavaScript

Jan 7, 2010

I have Gridview like this:

<asp:GridView ID="gvPartsSearchResult" runat ="server" CssClass="MRJ_TextGrid">
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:RadioButton
ID="rdButton"
runat="server"
AutoPostBack ="true"
onclick="javascript:CheckOtherIsCheckedByGVIDMore()"/>
<asp:HiddenField
ID="hdnFileExtension"
runat="server"
Value ='<%#Bind("FILE_EXTENSION")%>'/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

I want to read the hidden field value when the user clicks on the radio button.

View 2 Replies

Web Forms :: Get The Sitemap Javascript To Render Top Down Instead Of The Default Left To Right?

Jul 7, 2010

How can I get the sitemap javascript to render top down instead of the default left to right.

View 3 Replies

C# - Access Javascript Function On Default.aspx From Web Control?

Sep 1, 2010

I have some ajax fucntions on my default.aspx that I use for saving data to my db. I have the form on my web control. When I try calling the function from my button which resides on the web control. I get an error.

I need to call that function from my registerform.ascx. How do I do that from within the registerform code behind?

function ShowAvailability() {
$.ajax({
type: "POST",
url: "Default.aspx/CheckEmail",
data: '{usermail: "' + $("#<%=subs_email.ClientID%>")[0].value + '" }',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function(response) {
alert(response);
}
});

View 2 Replies

Javascript - Disable Buttonset While Keeping Default Style?

Dec 3, 2010

Is there a way where I can disable a buttonset in jQuery UI but prevent the buttonsets style from changing to the "grayed out" look when setting the buttons to disabled?

I have tried simply handling the click event of the buttons. IE:

$("#myRadioButton").click(function (event) { event.preventDefault(); });
$("#myRadioButton1").click(function (event) { event.preventDefault(); });

But this doesnt seem to work.

I am guessing my best bet is to apply the style from the buttonset to non jQuery generated ones and setting them to disabled yeah? Only reason I am wanting to avoid this as in future the ability to click the buttons will be enabled

View 1 Replies

JQuery :: Find Default Print Font In Javascript?

Dec 15, 2010

I am using javascript print function in my project (window.print) . i can' t able to chage the default font style in my funtion pls help me how to find the default font style in window.print

View 1 Replies

Web User Control With Javascript Used Multiple Times On A Page - How To Make Javascript Functions Point At The Correct Controls

Apr 12, 2010

I think I summed up the question in the title. Here is some further elaboration...I have a web user control that is used in multiple places, sometimes more than once on a given page.The web user control has a specific set of JavaScript functions (mostly jQuery code) that are containted within *.js files and automatically inserted into page headers.However, when I want to use the control more than once on a page, the *.js files are included 'n' number of times and, rightly so, the browser gets confused as to which control it's meant to be executing which function on.What do I need to do in order to resolve this problem? I've been staring at this all day and I'm at a loss.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved