Results 1 to 4 of 4

Thread: Dynamic LinkButton to a string value

  1. #1
    Join Date
    Feb 2009
    Posts
    81

    Dynamic LinkButton to a string value

    Please help me. So far nobody was able to help. I am trying to assign a dynamically created LinkButton to a string value. I was able to create a client script click event on a link button for normal ID's and numbers. But when I tried to do this with a string it causes a parse error. I have a function and there is definitely something wrong with it and I need someone to tell me if it can be done or not.

  2. #2
    Join Date
    Apr 2008
    Posts
    142

    Re: Dynamic LinkButton to a string value

    I whipped up a sample that converts the non-matched text to Literal controls. I have a PlaceHolder control on my web site that will accept Literal and LinkButton controls to seamlessly display the text and links. You cannot use NewGuid function for ids because it'll generate different id on every call (it means also on every postback) so events for all dynamically created controls will not be fired.

  3. #3
    Join Date
    Jan 2006
    Posts
    7,109

    Re: Dynamic LinkButton to a string value

    I guess the problem is somewhere in attaching event handler to dynamically created linkbuttons between pages postback. But I'm not sure...I suppose you are trying to assign the dynamically created linkbutton control id with the string value (from my understanding)

  4. #4
    Join Date
    Feb 2008
    Posts
    130

    Re: Dynamic LinkButton to a string value

    Moving the RebuildControls() sub from Page_Load to Page_Init actually made the issue worse, now when I click on the static Insert Row button or the dynamics link buttons to delete a row, all the dynamic controls disappear. What I mean by the new keyword Is when you say Object name;

    name = new Object(); // you allocate memory to the object
    or it could all be done once
    Object name = new Object();
    For sure you know what this is but may be I was not clear in my previous post .

Similar Threads

  1. Dynamic Backgrounds
    By KaIilAshhh in forum Windows XP Support
    Replies: 1
    Last Post: 21-05-2011, 01:53 AM
  2. What is Dynamic Notes
    By MaggieK in forum Windows Software
    Replies: 5
    Last Post: 06-02-2010, 01:11 AM
  3. How to Manipulate String using PHP String Functions
    By ComPaCt in forum Software Development
    Replies: 3
    Last Post: 21-09-2009, 09:07 AM
  4. C# 4.0 Dynamic
    By switchblade327 in forum Software Development
    Replies: 2
    Last Post: 09-07-2009, 06:19 PM
  5. Dynamic Overclocking
    By wazzeledozzle in forum Overclocking & Computer Modification
    Replies: 6
    Last Post: 06-12-2008, 05:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,235,563.30494 seconds with 17 queries