Label control's text doesn't appear to be set (in the page which has a user control )when trying to update the text property in the FormView's ItemUpdated event

Hi There,
I have a user control which hosts a formview control, gridview control and a label control. The grid view is used
to show rows in the DB and when clicked to edit each row, a form view opens up in edit mode with that particular row info.
So I have nothing in the item template.
My first question it mandatory to have smth in the itemtemplate of the form view.
I have controls in edititemtemplate and insertitemtemplate.
When a particular row is edited, I would like to show a status msg showing that the row has been updated.
For this, I use the ItemUpdated event of the formview and try to set the text property of the label with the success
status. For some reason, the text doesn't seem to be set. If I see the source code,
I see the label control but it doen't have the text property set. I debugged the code and the event does fire and the
event handler is called. I have the visible property of the label set to true.
I am new to 2.0...Can somebody plzz help me?


10/17/2006 3:21:06 PM 72751 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 30


Similar Artilces:

Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control.  The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...

Setting a parent page's label control text from a user control
I have a .net 2.0 site where I'll have the same form for user input on a number of pages. I plan on using a user control for this. The catch is if the user doesn't input the data properly I want to write the error message to a label control on the parent page, not in the user control. This is because the design for each parent page is different enough that we need to display the error message in a different part of the page. I've seen a couple of websites that mention using a base page that all my pages could inherit from to have a user control interact with the parent page. This...

How to set a Master Page's control's property through content page on a postback event?
Hi all, i m using a master page in my application. i have a panel on master page and a tab container with three tab panels on content page. i want to set/change  the visibility of the panel control when the tab is changed on the content page. By default the panel is invisible. To implement this i executed the following steps: 1. Set AutoPostBack of tacontainer to true 2. Wrote an event handler for ActiveTabIndexChanged event of the tab container 3 Wrote the following code on Tab changed event   if (TabContainerEmpPerformance.ActiveTabIndex == 1) { ...

Can I hide a user control's control from the hosting page's client script?
Okay, my previous question was not unswered and I guess you can't hide a control's panel with server code then show it with client code. Now this is what I try to do: on the hosting page's onload event, call a function to hide the user control's penal. Here is the deal: the user control was looped as many times as data required. So the penals will be name mypanel1, my panel2, etc... that is not even a problem if I know if the following is true: * Do all server codes finish running before the page get sent back to the client? Say the database gave me 5 penals, I can then determine how...

how to control a RadioButtonList's Listitem's text show according database's field
Hi my page has a repeater control,in repeater has a RadioButtonList control now i want to let the RadioButtonList has four Listitem,every Listitem's text is a database's field so the listitem can show dynamic according every record how can i work out my problem thanks a lot  hello dearbound your RadioButtonList to database if i m not clear fell free 4 replySatyabrat SinghB.E.(C.Sc.)Web developer Livetek Solution Dont forget to click "Mark as Answer" on the post that helped you. yes.i bound the radiobuttonlist to a dataset but how to display the ...

Setting Label's text attribute to the page title's text.
Is there a way to programmatically set a label's text attribute to the current page's title attribute? Such as (pseudo code):  private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here lblPageTitle.Text = PageTitle.Text.Attribute(); }   lblPageTitle.Text = Page.Title();  Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: Thank you for the reply, however, Page.Title is not available. Perhaps this is a 2.0 feature...

'Tab' control 's visible doesn't work.Why?
I use tab control in my applition. And I set visible=false, but it doesn't work. my code is: ----------------------------------------------- <asp:ScriptManager ID="ScriptManager1" runat="server" />  <div>   <ajaxToolkit:TabContainer runat="server" ID="Tabs" Height="138px" ActiveTabIndex="0"    Width="402px">    <ajaxToolkit:TabPanel runat="server" ID="Panel1" HeaderText="Tab1" Visible="f...

Setting a panel control's visibility and it's affect in nested controls.
I am trying to debug a page using the panel control.  The code in the final submission of the form has logic to get data from a dropdown based on the control's visibility.  If the control's visibility is set to true, the the data is retrieved and sent to the database.The problem appears to be the dropdown control's visibility is set to false when it should not.  The dropdown is nested in a panel control.  While doing a trace, it appears when a panel control's visibility is set to false, the visibility for all controls nested under this panel are set to false as well.You'r...

User control can't access the parent page's public properties
Hi Guys I have built a page that is contained within a master page and it holds 2 user controls Control A contains a DataListControl B contains a FormView I want to pass the selected index from the DataList on Control A to the FormView on Control B so it acts like a master / detail scenario I created a public property on the page that contains both controls called DataListSelectedIndex A also created a public property for DataListSelectedIndex on the Control  I populate the DataListSelectedIndex property of the Control when the DataList_SelectedIndexChanged...

BC30456: 'text' is not a member of 'System.Web.UI.Control'. Error when trying to assign literal dynamic text
************* Edited by moderator Adec *************** Inserted missing < code></ code> tags. Always include such tags when including code in your postings. Don't force the moderators to do your work. Many readers disregard postings without the code tags. ************************************************** Hello All, Here is a snippet of my code. All i'm doing is looping through a dataset, comparing one of the fields in the dataset with the name of an asp:literal i have in my page and if it maches then assign the asp:literal some text that i also get fro...

OLE Control
I'm attempting to load a .bmp image into an OLE object using PowerBuilder 11.1. The OLE ActiveX is AddFlow5 and I am using it to graphically represent links between entities - people, organisations, addresses, vehicles, telephones, etc. Documentation for AddFlow5 gives an example in VB script to load the relevant 'picture' into a node, ie, SET node.picture = LOADPICTURE("C:\images\person.bmp"). I cannot find a suitable equivalent in PB 11 to either 'SET' or to 'LOADPICTURE' The developer of AddFlow suggested I try: OLEObject uo uo = C...

Dynamic user control's onclick event won't fire
I'm dynamically creating several user controls that get loaded dynamically into a placeholder based on which linkbutton a user clicks, however my linkbutton onclick events never fire off.  I've tried initializing them in the Page_Init, Page_Load, & On_Init however none seemed to work.  If it helps, my placeholder control is located on my masterpage (called "phMenuContent") and I'm using ajax.  Here's my code so far: My user control page: ---------------------------------------------------------------------------------...

Can a User Control's Page_Load retrieve a value set in the parent's Page_Load?
I want to use a control to perform a specific task, but I want it to vary based on the page it is on. I was hoping to set a value in the Page_Load event of the Parent, and have that value retrieved by the Page_Load event of the user control. I am not sure what order these events fire in, Can I be certain that the parent event will fire first?...

'Error Creating Control' ... 'true' could not be set on property 'ShowRadioButtons'
I have created a custom control which inherits from a compositeControl. Its all works well in the browser but when I show it in the design mode I geta gray box with the following message Error Creating Control - GroupPicker1'true' could not be set on property 'ShowRadioButtons'. The Property is a fairly standard get and set Public Property ShowRadioButtons() As Boolean            Get                Return rowRadioButtons.Visible  &nbs...

Web resources about - Label control's text doesn't appear to be set (in the page which has a user control )when trying to update the text property in the FormView's ItemUpdated event -

Resources last updated: 12/17/2015 7:10:31 PM