Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default RE: passing parameters

    Hi Michael,

    I think you want to modify the links in web control programmatically.

    You can add several Hyperlink controls to the user control, and set their
    property to “public” in the code behind(*.ascx.cs). Then, in the code
    behind of web page, we can modify the links like this:

    private void Page_Load(object sender, System.EventArgs e)
    {
    WebControl wc=(WebControl)this.FindControl ("WebControl1");
    wc.HyperLink1 .NavigateUrl ="webform1.aspx";
    wc.HyperLink1.Text ="Test";
    }
    //Note: WebControl is the class name of the user control.
    //WebControl1 is the id of the user control.

    If I misunderstood your concern, would you please provide more explanations
    on your requirement? Thank you.

    Best Regards,
    Lewis

    Get Secure! - [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    | From: "Michael Tissington" <michael@nospam.com>
    | Subject: passing parameters
    | Date: Thu, 31 Jul 2003 15:07:55 -0700
    | Lines: 17
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    | Message-ID: <edn$ZC7VDHA.1180@TK2MSFTNGP11.phx.gbl>
    | Newsgroups:
    microsoft.public.dotnet.framework.aspnet.buildingc ontrols,microsoft.public.d
    otnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: antelope.oaklodge.com 63.67.71.5
    | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
    | Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontro ls:13592
    microsoft.public.dotnet.framework.aspnet.buildingc ontrols:6875
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
    |
    | I have a web control that is basically a complex TABLE structure that is
    | used on multiple pages as the menu.
    |
    | Usage on each page is identical except for a single table row which
    consists
    | of a bunch of <a> elements.
    |
    | How can I pass this to my web control ?
    |
    | Thanks.
    |
    | --
    | Michael Tissington
    | Oaklodge Technologies
    | [url]http://www.oaklodge.com/technology[/url]
    |
    |
    |
    |

    Lewis Wang [MSFT] Guest

  2. Similar Questions and Discussions

    1. Passing Parameters To CFC
      I am testing how to return data from a CFC within Flash Forms. I have a simple <cfselect> tag that will hold data returned from a CFC. This CFC...
    2. Question on Passing URL Parameters
      Thanks in advance for any responses to this question! I have a dynamic table (in a master page using javascript and asp) that links to a detail...
    3. cflocation - passing parameters
      Hi, Is it possible to do the following with CF? If not how can it be done. <cflocation url='template.cfm?id=#id#'> Thanks in advance
    4. Passing Parameters into NEW()
      Is there any way that the NEW() of a web service can accept parameters ? I would like to pass a boolean to indicate to the webservice that I am in...
    5. Help Passing Parameters
      Before going to the third script I'd suggest storing the variables in session variables. Here's how I generally do login scripts. Perhaps have...
  3. #2

    Default passing parameters

    is it possible to pass parameters in html like in asp.... products.asp?cat=3

    .... what i want to do is when i click on a html link, it opens up news.html,
    and then opens up a particular news article in an iframe on that page.

    Thanks,

    Brian.


    Brian Guest

  4. #3

    Default Re: passing parameters

    "Brian" <quigleyb@iol.ie> wrote in message
    news:caus8j$qhg$1@kermit.esat.net...
    > is it possible to pass parameters in html like in asp....
    products.asp?cat=3
    >
    > ... what i want to do is when i click on a html link, it opens up
    news.html,
    > and then opens up a particular news article in an iframe on that page.
    There is no server-side processing in HTML ...

    --
    Tom Kaminski IIS MVP
    [url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]
    [url]http://mvp.support.microsoft.com/[/url]
    [url]http://www.iisfaq.com/[/url]
    [url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running IIS
    [url]http://www.tryiis.com[/url]


    Tom Kaminski [MVP] Guest

  5. #4

    Default Re: passing parameters

    Don't know if this might hopefully help at all.

    Example URL with a querystring:
    [url]http://www.mysite.com/mydir/mypg.asp?myvar1=hey&myvar2=ho[/url]

    Because a variable might contain some odd characters like spaces, it's
    usually a good idea to use Server.URLEncode when creating a querystring
    from a variable:
    <a href="http://www.mysite.com/mypage?id=<%=
    Server.URLEncode(objRS("MyIDFldFromDB")) %>">objRS("MyIDFldFromDB")</a>

    And in the page that is opened you can use Request.QueryString("id") to
    get the value of id.

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Designer
    [url]http://www.Bullschmidt.com[/url]
    ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139