Professional Web Applications Themes

ASP.NET C# - Show Region if NOT Empty Value in Field - Adobe Dreamweaver & Contribute

Using MS SQL Server 2K; DW MX2004 I have a phone list stored procedure that returns all of the data I need. The problem is that for a lot of records, data doesn't exist. IE....conference rooms don't have cell phone numbers, so there is no need to show that. What I'd like to do is to not show a region if a value is null. I see that there is the Advanced Conditional Region Server Behavior, but it doesn't work for .NET. Can anyone explain (in simple terms) how to do this? I know my way around Dreamweaver and it's ...

  1. #1

    Default ASP.NET C# - Show Region if NOT Empty Value in Field

    Using MS SQL Server 2K; DW MX2004

    I have a phone list stored procedure that returns all of the data I need.
    The problem is that for a lot of records, data doesn't exist.
    IE....conference rooms don't have cell phone numbers, so there is no need to
    show that.

    What I'd like to do is to not show a region if a value is null. I see that
    there is the Advanced Conditional Region Server Behavior, but it doesn't
    work for .NET.

    Can anyone explain (in simple terms) how to do this?

    I know my way around Dreamweaver and it's built-in tools, but I'm not so
    great at hand-coding .NET. My background is Flash programming and
    JavaScript (among many other things ;-)).

    Thanks,

    Chris Hayes


    Christopher Hayes Guest

  2. #2

    Default Re: ASP.NET C# - Show Region if NOT Empty Value in Field

    Figured it out (with some help)

    expression='<%# (stpSearch.FieldValue("OPhone", Container) != "") %>'

    Where...
    stpSearch is my stored procedure name
    and OPhone is the value that shouldn't be null.



    Christopher Hayes Guest

  3. #3

    Default Re: ASP.NET C# - Show Region if NOT Empty Value in Field

    The logic goes like

    <span id="foo" runat="server" visible='<%#myvariable <> ""%>'>boo</span>

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  4. #4

    Default Re: ASP.NET C# - Show Region if NOT Empty Value in Field

    I should also add that I first added the standard "Show Region if Data Set
    is Not Empty" Server Behavior and then edited the expression string.

    -Hayes


    Christopher Hayes Guest

Similar Threads

  1. Show region if recordset is not empty
    By faiz2000 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: September 4th, 08:13 PM
  2. Show Region & ASP.NET forms
    By jefreywith1f in forum Dreamweaver AppDev
    Replies: 2
    Last Post: May 4th, 04:15 PM
  3. Show if recordset is empty??
    By longsdale in forum Dreamweaver AppDev
    Replies: 4
    Last Post: April 1st, 04:37 PM
  4. Repeat Region field formatting
    By Mike1500 in forum Dreamweaver AppDev
    Replies: 0
    Last Post: March 14th, 02:15 AM
  5. Folders associated with actions won't show Folder is Empty in XP
    By dave milbut in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 6
    Last Post: August 6th, 09:23 PM

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
  •  

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