.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Update information via txt control

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net

Hi All,

I have big problem.

On the form I have

The GridView is a command "Edit"

But I do not want the information update within a GridView.

If  click on the "Edit", the data can only change update within the GridView.

I wish to correct information in the control txtFirstName, txtLastName, txtAddress when I click "Edit".

Do you have any case?


View Complete Post

More Related Resource Links

Accordion Control with Panel...Add an Update Panel?


I have an accordion control in my web site.  And in one of the panels, I have a drop down list box where, when the user selects an item, it updates the labels right below the ddlistbox.  I have it so that it maintains the scroll position when the ddlistbox has an autopostback, but it's very obvious that the whole page posts back.

My question is, can I/should I just enclose the ddlistbox and the labels (and a couple of text boxes) in an AJAX update panel?  I already have a ToolScriptManager (because of the accordion control), so I don't need to have another script manager, right?  I can just put the update panel (with the other controls inside of it) right in the accordion panel, right?  Then when the ddlistbox posts back it won't have the delay of the whole page posting back?  And it'll still execute the event handler for the listbox selection change?

Does this sound right?  I'm just looking to make the post back "invisible", and I would like to do a partial postback of just these few controls.

Thanks in advance! :)

changing records frm control in update panel


i have a list box, a command button and a grid

when i click a particular record / or multiple records on the  list box and then cclick the command button the records r transferred 2 the grid

i also have custom paging, the paging shld ocur as many times i clcik the command button

i have used updatepanel with the command button in it so that partial postback ocurs or there is no page flicker ,

but when i use update panel i get teh records in the grid but custom page is not working . it has no affect even if the records are added

if i remove update panel the paging works properly

how do i manage it with update panel

Use update progress control to change image control imageurl

UPDATE: Apologies for the previous formatting error - hopefully the post is now more readable... Hi I have a button with an image control next to it. Before the button is clicked, the image control "ConfirmedStatusImage" shows a "cancel.png" image. When the button has been clicked (and some other code successfully executed), then I change the imageurl for the "theConfirmedStatusImage" to show a "ok.png" image. Quite a bit of time can often pass between clicking the button and the associated code executing, so I have an ajax update progress control that shows a "bluespinner.gif" image while the page is updating after the button click. At the moment, the update progress updating image appears next to the "ConfirmedStatusImage" control. However, I would like to change things so that when the update progress starts, the imageurl of "ConfirmedStatusImage" changes from "cancel.png" to the update progress image (i.e., the "bluespinner.gif"). Then, when the update is complete, then the image should change to the "ok.png" image. My question is: how can I achieve this? As far as I can tell, the update progress control does not have any events that I can hook into. Also, placing the "ConfirmedStatusImage" inside the ProgressTemplate would not work either, as this only displays

Update panel with WebChart Control not happening :(

Hi guys,I have a drop down list with questions, according to selected question a chart is generated, when you enter the page and select a question for the first time, the chart gets generated correctly, but then when you select another question update panel doesn't show the updated chart (all charts are working, if i test the questions manually).Here is the update panel that i have:<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">             <ContentTemplate>                   <Web:ChartControl ID="ChartControl1" runat="server" BorderStyle="Outset"                         BorderWidth="5px">                    </Web:ChartControl>                </ContentTemplate>             <Triggers>               

File upload control and update panel ... ab-normal behavior?

 I have two update panels on single page . 1st one contain drop down and some other controls. I have used asyncpostbacktrigger in 1st update panel.  while in second PostBackTrigger (because of file upload). When page loads , it first dislays the content of 1st udate panel, when I click button to show the content of 2nd update panel , its contents are not displayed. look at this code, it demonstrates what I mean to say. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:panel ID="pnl" runat="server"> <asp:DropDownList ID="drpdwn" runat="server"> <asp:ListItem>Item 1</asp:ListItem> <asp:ListItem>Item 2</asp:ListItem> </asp:DropDownList> </asp:panel> <asp:Button ID="lnkbtnNext" runat="server" Visible="false" onclick="Button1_Click" Text="Next" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="lnkbtnNext" /> </Triggers> </asp:UpdatePanel> <asp:UpdatePanel ID="updpnl3" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:PlaceHolder ID=&qu

UPDATED: AJAX FAQ? And: How to Style the AJAX tab control's tabs: complete information

UPDATE April 08, 2009: for the latest version of this post, with up-to-date info on styling the Tab control, see my just updated Blog post -- the info below is somewhat outdated and does not have some additional details I have added to the Blog post.   First of all, I would like to suggest that the AJAX section of the ASP.NET forums have its own FAQ section. I was going to post this in the general ASP.NET FAQ, but it didn't really fit, and there was no AJAX FAQ, so I'm posting it here. Next: I have been looking for details on how to style the Tabs in the AJAX Toolkit's Tab control for over a week now. I have found information that is misleading, incomplete, outdated, and just plain wrong. And nowhere have I come across all the information needed to make it work in one place. So, I am posting this here. I hope that an AJAX FAQ can be created, and this post moved there.   I am including some background information, about the difficulties people are having in finding information on styling the tabs, first; after that I will include the complete instructions for styling the tabs. First: the information on the documentation page for styling the tabs is misleading at best, as well as incomplete. The docs tell you that you can simply add your styles to your project as CSS, and neglect to tell you that you must add a "CssClass" attribu

File Upload Control is not working in Update Panel

hi friend... i am using update panel... in one of my aspx page (ASP.NET 2.0)there is a file upload control in update panel which is used to upload company logo on server..when i remove the update panel.. than file upload is working properly..but when i again place an update panel then file upload control is not working and its giving me error.. in likeIf String.IsNullOrEmpty(fldLogo.PostedFile.FileName.ToString) Then                 as object reference not set to an instance of an object... can any body help me ?any idea ??  

How to determine if a user control is contained by the update panel that triggered async postback

Does anyone know a simple way to determine if a user control is contained in an update panel that was triggered for async postback?At the moment, the only pseudo logic for this I can think of is?'Loop through the update panel controls on the page and find the one that is involved in the postback (isInPartialRendering)'Try to find the user control as a child of the update panel

How to invalidate one control based on information in a second control

An expiration date is required for a license unless it is a lifetime license.  I have two controls; a ComboBox for the license type and a DateTimePicker for expiration date.  I have created a class called RequiredExpirationDateValidationRule. The only way to invalidate just the DateTimePicker appears to be to place the RequiredExpirationDateValidationRule in the binding for the SelectedDate property of the DateTimePicker.  However, I can't get the SelectedItem property of the ComboBox to see if I have a lifetime license type selected.  So I have to place the RequiredExpirationDateValidationRule in a BindingGroup that includes both the ComboBox and the DateTimePicker.  But now the DateTimePicker is not invalidated by the RequiredExpirationDateValidationRule when it returns a false ValidationResult. How do I solve this problem?

Update Gridvew Row inside popup extender control

I have a gridview with popup control extender to show details of the row, it works ok. But I also need to update the fields inside this popup window. How do I get the row ID and pass it to the button click event handler? Please help. 

User Control with JQuery doesnot work inside update panel


Hi All,

I created a .NET user control to work as a DropdownCheckbox and added Jquery to give the sliding and hide effects. The code is as below:

 <script language="javascript" type="text/javascript">
        var showRegionWindow = function (ev) {
            var pos = $("#lnkChangeRegion").offset();
            var width = 230;
            var height = 55;
            //$("#changeRegionPanel").css({ "left": +((pos.left) - 215) + "px", "top": height + 16 + "px" });.
            document.getElementById("lnkChangeRegion").style.display = 'none';

        var hideRegionWindow = function (ev) {
            var textVal = "";

Unable to Set Control's Property After Update / PagePostBack


I'm trying to programmatically set the property of a control on my Form AFTER I've proccessed an update command using the FormView, but it's not working. 

In my example below, I have a basic FormView with only a TextBox and Label in its EditItemTemplate.  The FormView uses an AccessDataSource.  The TextBox is bound to the datasource, but the label is not.  What I'm trying to do is update the value in the TextBox (as well as its associated data stored in the database), and then change the Text property of the Label. (*Note: that I using the label purely as an example. The point is I can't see to set any control's property after an update).

I initally thought it had something to do with the "Page.IsPostBack", but even after trying to adjust my code for that, its still not working.

I've tried change the Text property during the Page.IsPostBack during Page_Load event. I've tried setting the Label's EnabledViewState property to True and to False. I've tried using the FormView's OnItemUpdating and OnItemUpdated events. I've tried using the DataSource's OnUpdating and OnUpdated events.

Nothing seems to work. Any suggestions?

Here's my sample code and Html:

<script language="VB" run

Dynamic Control in update panel



I am developing a page where i am generating dynamic control in Update panel. I am getting eror when I am assigning trigger's control ID.


  private void LoadControls(string strGridId, DateTime dtGridDate, bool bAllocReadonly)
            pnlSectorGrid.Visible = true;
            DataSet ds = GetSectorialGridData(strGridId, dtGridDate);
            Table table = new Table();
            table.ID = "Table1";

            for (int Index = 0; Index < ds.Tables[0].Rows.Count - 1; Index++)
                TableRow row = new TableRow();
                TableCell cell1 = new TableCell();
                TableCell cell2 = new TableCell();

                Label lblSectorName = new Label();
                lblSectorName.Text = ds.Tables[0].Rows[Index]["tsu_SubSectorName"].ToString();
                lblSectorName.Font.Size = 10;

                TextBox txtAlloc = new TextBox();
                txtAlloc.Text = ds.Tables[0].Rows[Index]["Alloc"].ToString();
                txtAlloc.Font.Size = 8;
                txtAlloc.Width = 90;
                txtAlloc.ReadOnly = bAllocReadonly;

update xml from GridView control


I want to update an external xml simply using GridView control. Gridview Control offeres comand links such as delete and update. But they result in an error saying "Specified Methos not supported"

<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/event.xml"></asp:XmlDataSource>

<asp:GridView ID="DetailsView1" runat="server" DataSourceID="XmlDataSource1" AutoGenerateColumns="False">
            <asp:CommandField HeaderText="delete" ShowDeleteButton="True" />
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField HeaderText="Date" DataField="date" />
            <asp:BoundField HeaderText="Event" DataField="dis" />

The actual file is at http://djmarya.com/Default.aspx. why error? Is there a way arount it?

Please help!


Problem with User Control, Update panel and flicker


I have  block of code that consists of a textbox a button and a dropdown. The text entered in the text box filters the dropdownlist when the user clicks the button. The Ajax works great when it is in a simple page but if I put the same code in a User control I get flicker. Can anyone assist with this issue?

information on asp.net control attributes



where is the list or documentation to know what styles can be applied for the asp.net controls like datagrid, detailsview, pagerstyle, etc.

Also where should I get information por setting on the alternate data item style? when I have a details view I would like to have a row with a different color the odd row for example

Thanks :)

Update all Properties in the User Information List after restoring a site collection to a new domain


hi All

I moved a site collection (content db) from one domain to another. After the site collection was restored i ran the stsadm -o migrateuser -oldlogin -newlogin. The result was that the login id of the user in the source domain was replaced with the login in the destination domain.

However the rest of the properties in the User Information List (paricularly interested in the Email) was not updated.

How can i get all the properties in the User Information List with values in the new domain

Thanks in Advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend