Search

You searched for the word(s): userid:789788

Matching Posts

  • Re: what is a postback in asp.net

    Try this page as it gives some details on ASP.Net page post back http://www.xefteri.com/articles/show.cfm?id=18 When as ASP.NET pages is being rendered all the server side controls get converted to HTML so that they can be displayed in a web browser, for example <asp:Button .../> would be converted to <input type="submit" .... /> all this HTML is contained inside a HTML form such as: <form name="aspnetForm" method="post" action="MyPage.aspx"
    Posted to Getting Started (Forum) by alan@gangleri.net on 3/24/2008
  • Re: When null is not null

    When you are registering web user controls you have to add code like the following to the web.config: <add tagPrefix="es" src="~/Controls/ContentDisplay.ascx" tagName="ContentDisplay"/> There's a good blog post at http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx which might explain this better. Good luck ;-)
    Posted to Getting Started (Forum) by alan@gangleri.net on 3/23/2008
  • Re: Add buttons to a TreeNode

    I was able to solve this by making the custom control that contains the tree control implement IPostBackEventHandler. Inside my tree node I used the following code to get a handle on the current page and then the containing control: Page page = HttpContext.Current.CurrentHandler as Page; ClientScriptManager csm = page.ClientScript; Control mainContent = page.Master.FindControl( "MainContents" ); I was then able to register the button click as follows which will cause a post back that is
  • Re: Custom TreeView and Custom TreeNodes

    Thanks for your replay, However this is info I already knew. The reason I derived two different classes from TreeNode was precisely to override RenderPostText in two unique ways. I want the parent node to have a button to create a new child and delete itself and I want child nodes to have buttons such as delete, manage etc. I have also extended the TreeView control and I was attempting to override the CreateNode method. But to do this I would like to have logic in the CreateNode method that decides
  • Custom TreeView and Custom TreeNodes

    Hi, I have created two custom tree nodes, one for a parent and one for a child. I've created two custom nodes as I need to render a different set of buttons beside each node. I have also created a custom TreeView and have attempted to override the CreateNode method. However I' not sure how to implement the CreateNode method. The following code snippet illustrates what I'm trying to accomplish. protected override TreeNode CreateNode() { if (someCondition) { return new ParentNode(); } else
    Posted to Custom Server Controls (Forum) by alan@gangleri.net on 3/18/2008
    Filed under: controlrol custom, CreateNode, custom controls, custom control
  • Re: Add buttons to a TreeNode

    Thanks again Amanda, I think I'm really making progress with this now just one more question (hopefully). In you sample code you have the line: [quote user="Amanda Wang - MSFT"]writer.AddAttribute(HtmlTextWriterAttribute.Onclick, Page.GetPostBackEventReference(this, "Previous"));[/quote] This is inside the TreeNode which does not extend System.Web.UI.WebControls.Control, as far as I'm aware therefore how can you pass ' this ' as an argument to GetPostBackEventReference
  • Re: Add buttons to a TreeNode

    Thnaks Amanda, This is a great help, just one question though, if I had two buttons rendered in each TreeNode how could I determine which button had caused the TreeNodeSelectAction .Select action to fire? Thanks again for your help
  • Re: Customize TreeNode

    I've looked into this a bit further. What I've done is add an HTML button on RenderPostText. This button has a client side click event that display an alert box and this all works fine. The buttons are displayed beside the TreeNode and the client click event works as expected. Is it possible that the problem could be down to ViewState? I think what could be happening is the details of ImageButton's event handlers are lost on the post back, I have looked at saving the state of the buttons
  • Re: Customize TreeNode

    Thanks AJ, I've already tried adding "base .RenderPostText (writer);" and had no luck The problem I have is that the event handler for the button is never fired. All the best Alan.
  • Add buttons to a TreeNode

    Hi, I'm trying to extend the default TreeNode so that there are additional ASP.Net buttons displayed beside the node. So far I have extended the TreeNode class and overriden the RenderPostText method so that the buttons are displayed. However when the page is rendered to the client the event handlers don't fire, I've included my TreeNode class and would be very grateful for any advice. 1 using System.Web.UI; 2 using System.Web.UI.WebControls; 3 using MyApp.Storage; 4 5 namespace SampleApp
    Posted to Master Pages, Themes and Navigation Controls (Forum) by alan@gangleri.net on 3/9/2008
    Filed under: Button, Catching Child Control Events, C#, "custom control"
Page 1 of 1 (10 items)