Set images in aspx to visible =true if checked in database equals true

I'm trying to visibly display which car park spaces are occupied. I have done this so far by using images on top of a panel with a car park background and a select date box as shown in code below:
<asp:Label ID="Label3" runat="server" Font-Bold="True" Width="125px">Select Date:</asp:Label><b></b>
<asp:TextBox ID="DateBox" runat="server" Width="140px" AutoPostBack="True">dd/mm/yyyy</asp:TextBox>
<asp:ImageButton ID="DateImage" runat="server" Width="34px" ImageUrl="~/Pics/Select_date.png" Height="23px" />
<ajaxToolkit:CalendarExtender runat="server" TargetControlID="DateBox" PopupButtonID="DateImage" Format="dd/MM/yyyy"></ajaxToolkit:CalendarExtender>
</div>
<div>
<asp:Panel runat="server" BackImageUrl="~/Pics/Available.png" Height="427px" Width="662">
<asp:Image ID="Bay1Occ" runat="server" Height="56px" ImageUrl="~/Pics/OccupiedDisabled.png" style="top: 728px; left: 40px; ; float: left; height: 65px; margin-top: 0px;" Width="40px" Visible="false" />
<asp:Image ID="Bay2Occ" runat="server" Height="56px" ImageUrl="~/Pics/OccupiedDisabled.png" style="top: 726px; left: 84px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay3Occ" runat="server" Height="56px" ImageUrl="~/Pics/OccupiedDisabled.png" style="top: 727px; left: 129px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay4Occ" runat="server" Height="56px" ImageUrl="~/Pics/OccupiedDisabled.png" style="top: 728px; left: 172px; ; float: left; height: 65px" Width="40px" Visible="False" />
<asp:Image ID="Bay5Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 728px; left: 219px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay6Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 728px; left: 264px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay7Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 728px; left: 309px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay8Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 728px; left: 355px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay9Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 728px; left: 403px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay10Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 727px; left: 448px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay11Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 727px; left: 494px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay12Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 727px; left: 538px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay13Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 726px; left: 584px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay14Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 727px; left: 631px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay15Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 864px; left: 38px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay16Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 865px; left: 83px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay17Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 864px; left: 128px; ; float: left; height: 65px" Width="40px" Visible="False"/>
<asp:Image ID="Bay18Occ" runat="server" Height="56px" ImageUrl="~/Pics/Occupied.png" style="top: 865px; left: 173px; ; float: left; height: 65px" Width="40px" Visible="False"/>
</div> </div>
I want when the date is selected for the images shown in code above to be set to visible depending on if the checked box in database shown below = true.
CREATE TABLE [dbo].[History] (
[BookID] INT IDENTITY (1, 1) NOT NULL,
[Disabled] BIT NULL,
[ParkName] NVARCHAR (50) NULL,
[Campus] NVARCHAR (50) NULL,
[BayNo] INT NULL,
[VisId] INT NULL,
[StaffId] NVARCHAR (128) NULL,
[bkDate] NVARCHAR (10) NULL,
[Checkin] NVARCHAR (10) NULL,
PRIMARY KEY CLUSTERED ([BookID] ASC),
I cant use the Booking ID as that corresponds to the booking number. The space identity is made up of bay no, campus and park name.
I have this in my aspx.cs so far but have no idea how to do what I need. I have tried researching it.
int BookingDisplay()
using (SqlConnection myConnection = new SqlConnection(DefaultConnection))
myConnection.Open();
//Add visitor to database
SqlCommand MyCommand = new SqlCommand
("SELECT (ParkName), (Campus), (BayNo) FROM (History) WHERE (((bkDate) = @bkDate) AND ((Checkin) = @Checkin))", myConnection);
MyCommand.Parameters.AddWithValue("@bkDate", DateBox.Text);
MyCommand.Parameters.AddWithValue("@Checkin", true);
MyCommand.ExecuteNonQuery();
a desperate learner

The History table should have its own ID called RecID that is the primay key and an
IDENTITY column.
The BookID column should be coming from another table call it Bookingnumbers that has a BookID that is assigned to the BookiD in History when a dummy record is inserted into Bookingnumbers. BookID in Bookingnumbers is just a count or counter table that holds
the last ID used for (Book Numbers) with BookID in Bookingnumbers being an
IDENTITY column used to populate BookID in the History BookID column..

Similar Messages

  • How to set image source path in formsweb.cfg file in forms 11g

    Hi,
    I had written HTML code in the formsweb.cfg file in forms 11g. In the below code i am unable to retrive image file(i.e., .gif, .jpeg) from the server or local machine.
    In the below HTML code i set image source in the image tag as below:
    <img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF"
    Is this correct path to fetch the images from the server or local machine .
    Please help me out how to set path for image in html or is there any alternate process to retrive images.
    Here is the code :
    [INDIVIDUALUAT]
    workingDirectory=D:\Aims10dev\Work
    form=LMstartup.fmx
    userid=rmenu/rmenu@RLIFEQA64
    codebase=/forms/java
    imageBase=codebase
    width=1005
    height=750
    WebUtilArchive=/forms/java/frmwebutil.jar,/forms/webutil/jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,life-icons-round.jar,Agilis_Icon.jar,life_Icon.jar,personalize.jar,hyperlink.jar,amazingbutton.jar
    archive=frmall.jar
    separateFrame=False
    lookandfeel=Generic
    EndUserMonitoringURL=True
    usesdi=yes
    #HTMLbeforeForm= <table width="1005" border="0" cellspacing="0" cellpadding="0"><tr><td width="200"><img src="/forms/html/agilis-life-logo.gif" width="200" height="80" /></td><td width="10"><img src="/forms/html/agilis-life-new11_02.gif" width="36" height="80" /></td><td width="805" valign="top" background="/forms/html/agilis-life-new11_03.gif"></td></tr></td></tr></table>
    HTMLbeforeForm=<body topmargin="0" leftmargin="0" > <table width="1005" height="100" border="0" cellspacing="0" cellpadding="0"><tr><td width="200" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-logo.gif" width="200" height="80" /></td><td width="10" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_02.gif" width="36" height="80" /></td><td width="550" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_03.gif" width="550" height="80" /></td><td valign="bottom"><table width="219" height="90" border="0" cellspacing="0" cellpadding="0"><tr><td height="36" valign="bottom" align="center"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agile-logo.jpg" height="36"></td></tr><tr><td height="10" valign="bottom"> <div align="right"><span style="font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; text-decoration:none; color:#00000; " >Home | Change Password | Logout</span></div></td></tr><tr><td colspan="3" valign="bottom"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF" width="100%" height="39" /></td></tr></table></td></tr></td></tr></table></body>

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • Set item property to false and true

    when i set item to false and then set item property to true. The item is displayed but its gray out and not enabled. Am i missing something
    Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_FALSE);
    and then
              Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_TRUE);

    Check the Forms online help on Set_Item_Property, near the bottom in the usage notes. Lots of things happen when you set visible to False:
    Setting DISPLAYED to False:
      sets the Enabled and Navigable item properties to False
      sets the Updateable item property to False
      sets the Update_Null item property to False
      sets the Required item property to False
      sets the Queryable item property to False
    So you may need to set more of them back to true in your code when you want to make it re-display.

  • Panel.visible=true doesn't seem to work when logged in.

    Hello,
    I’m tryin to make a flex application. When a user logs in there appears an extra panel. I’m trying to make this work with pnl.visible=false and when logged in pnl.visible=true. But somewhere there must be an error cause the panel is not seen, when logged in. On the base state you have a login button which shows the loginstate when clicked. There you can give username and pass and a button which starts the function checklogin(event). All the code in this function works, except the pnlmonbeheer.visible=true., because when you log in successful and you go back to the base state and you then go to the ‘statetoeristingelogd’ state, the panel is still not visible. Here the code:
    private function checklogin(evt:ResultEvent):void
                            if(evt.result.loginsuccess == "yes")
                            _user = this.username.text;
                            currentState = "";
                            this.lblwelkom.text="Welkom " + _user;
                            pnlmonbeheer.visible=true;
                            if(evt.result.loginsuccess == "no")
                            mx.controls.Alert.show("Invalid username/password");
    The other button on the base state leads you to the state ‘statetoeristingelogd’. The panel ‘pnlmonbeheer’ that I want to make visible is on this state and is set invisible because of visible=”false”.
    <mx:State name="statetoeristingelogd" basedOn="statetoerist">
                      <mx:RemoveChild target="{button3}"/>
                      <mx:AddChild relativeTo="{panel2}" position="lastChild">
                            <mx:Panel  visible="false" x="0" y="348" width="250" height="111" layout="absolute" title="Beheer Monumenten" borderColor="#DEE438" backgroundColor="#B9BBBC" backgroundAlpha="0.7" id="pnlmonbeheer">
                                 <mx:Button x="8" y="6" label="Toevoegen" width="115" click="showaddmon();"/>
                                 <mx:Button x="133" y="6" label="Updaten" click="showupdatemon();"/>
                                 <mx:Button x="8" y="39" label="Verwijderen" click="deleteRow();"/>
                            </mx:Panel>
                      </mx:AddChild>
    Somehow the panel stays invisible
    Can someone help me please, thank you in advance..
        

    hi,
    enterState="pnlmonbeheer.visible=true"
    add this event in your state as following
    <mx:State name="statetoeristingelogd" basedOn="statetoerist" enterState="pnlmonbeheer.visible=true"> 
    if pnlmonbeheer becomes visible then it means pnlmonbeheer dont have visibility from the function checklogin because it may be not added yet to the stage during the state change so you may set its visibiliy on enterState event
    regards
       ATIF

  • Want to set mailto for google apps;tried editing the gecko...mailto.2.uritemplate as per instructions found on web; set 3 related config values to "true" as per instructions; does not work; tried javascript method without success

    I want to set the mailto app for google apps gmail.
    I tried editing the gecko...mailto.2.uritemplate as per instructions found on web (https://mail.google.com/a/MYDOMAIN/mail/?extsrc=mailto&url=%s.
    Set 3 related config values to "true" as per instructions (network.protocol-handler.expose.mailto ; network.protocol-handler.warn-external.mailto ; AND, third, gecko.handlerService.allowRegisterFromDifferentHost.
    Does not work, no Google Apps in the mailto app spot.
    Tried javascript method in address bar without success:
    javascript:window.navigator.registerProtocolHandler("mailto","https://mail.google.com/a/MYDOMAIN/mail/?extsrc=mailto&url=%s","Google Apps GMail")
    Any light anyone can shed will be appreciated. Cheers, jlf

    Great howto Steve! This further increased my understanding of the MVC patterns used by BC4J.
    Some remarks:
    [*]Select New Business Components...
    This should be 'New Business Components Package', or you won't be able to add business components.
    ename as "Name",
    sal as "Salary"
    from emp
    where empno = ?That should be deptno.
    [*]Select the EditEmpsInDepartment view objectThat should be EmpsInDepartment.
    Greetings,
    Ivo

  • How to Set Image to Lock Screen and Background in Windows Store API?

    How to set an image to windows lock screen and desktop background for windows store app in c#?
    if changing lock screen is available in windows store C# how about changing the desktop background using Windows store C#?

    Hi icce cage,
    To change the Windows lock screen we can use this API:
    LockScreen class with set image methods.
    To change the desktop background, it is not possible as I know.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HOW TO SET IMAGE DPI

    I read images which are 300 DPI . I get it in BufferedReader, and do some pixel manipulation. When I save those pics as PNG or JPEG the image DPI becomes 72 DPI. There should be a way to set image DPI when converting from Bufferedeader to .pgn or .jpg file.

    I need to know how to set DPI to 400 without destroying the image data or pixel height and width. I know of two places within the header of a jpeg that this can be set a third I can see through debug information in metadata but cannot set. Why is this so difficult to manipulate?

  • Setting the: signed.applets.codebase_principal_support to true is not working ( keeps asking to set it to true)

    i've Set the Boolean string to true but when i try to copy paste in firefox it just gives me the message again
    ( you need to set the signed.applets.codebase_principal_support to true )
    Is this a know bug ?
    thanks.

    Try this extension - Allow Clipboard Helper: <br />
    https://addons.mozilla.org/en-US/firefox/addon/852

  • How set image size open raw file?

    How to set image size/resolution when opening a raw file in pse 11 editor??
    win 7 pro; pse 11 settings: edit>preferences>print resolution = 337.596, screen resolution 109 dpi( 27 inch, dell U 2711). Originally print resoltuion was set to 240 dpi  but was changed in case this was causeing a problem. CRAW v 7.4.0.137
    Camera alpha 65, image size is: 6000x3376 dpi; (83.33x46.88 inch)
    Problem is: Currently when I edit a RAW file in CRAW and then open in pse editor image size is: 6000x3376 px; 25x14.667 inches at 240 dpi ( by ration this corresponds to:17.773x10 inch at 337.6 dpi)
    I am trying to change settings so the raw file opens as: 17.776x10 and anywhere from240 to 337.6 dpi
    whatever works or is esiest to set.
    My settings are for use in creating blue ray dvd movies and with cropping and editing printing high quality pictures for family.
    Thanks  in advance for any help you can provide.

    That's a Sony Alpha SLT-A65?
    Are those pixel dimensions of 6000 x 3376 the size the camera raw files came out of the camera?
    You can't really change the resolution that the photoshop elements version of camera raw opens the the files into the pse 11 at.
    (i think 240 is the default for most cameras)
    You can however set the resolution with Image>Resize>Image Size if you need to for printing or other uses.
    In the Image size dialog uncheck Resample Image and enter the resolution.

  • How to set image properties ?

    Dear All,
    I need your help to set image properties like (Title , Subject , Comments .... )
    thanks

    NVidia writes the DDS file format plugin, you need to talk to them about it.

  • How to set Image to ListView?

    How to set Image to ListView?

    There is an example about customizing the content of a list view using the cell factory: http://docs.oracle.com/javafx/2/ui_controls/list-view.htm#CEGGEDBF

  • Is it possible to change the automatically set image on the new iMovie Theater title screen?

    I made a few movies on the new iMovies 2013 then uploaded into iTheater. I love the software and its ease of use. However, I noticed iTheater automatically sets the title image. Similar to youtube, iTheater probably uses the video mid point image as default. Is it possible to change the set image on iTheater?

    Unfortunately, no.

  • MOUSE_OVER/MOUSE_OUT - txt.visible=true/false;

    I have a small problem with MOUSE_OVER, MOUSE_OUT event. On this map(MovieClip) I have 3 points(buttons) and when you will put a mouse cursor over one of them, in a space on the left sites will appear an address (difrent for all of buttons).
    1º I have buttons with instance names on the stage (qlu_btn, mad_btn, are_btn)
    2º In my library I have my text(address) - I transformed it in a symbol (MovieClip) and I assigned the instance names (qlu_txt, mad_txt, are_txt) in proprties.
    This is my AS3 for this movieClip for 1º of the buttons... but it doesn't works... Any idea where is a problem????
    var mad_txt:MovieClip = new MovieClip;
    addChild(mad_txt);
    mad_txt.x = - 140.0;
    mad_txt.y = - 65.0;
    mad_txt.visible = false;
    mad_btn.addEventListener(MouseEvent.MOUSE_OVER, gotoMadridOver);
    mad_btn.addEventListener(MouseEvent.MOUSE_OUT, gotuMadridOut);
    function gotoMadridOver(event:MouseEvent):void{
         mad_txt.visible = true;
    function gotoMadridOut(event:MouseEvent):void{
         mad_txt.visible = false;

    The code probably works but it's only an empty MovieClip, so you won't see it and won't be able to interact with it.  All that the following line does is create an empty MovieClip object named mad_txt.  It will have no relation to anything else you have done.
    var mad_txt:MovieClip = new MovieClip;

  • How to set the init-param debug_mode to "true"

    Hi All,
    I wrote a custome application that will get invoked when I click the link in the SES search result page.
    I could invoke the application. However, getting the following exception when I click one button in my application:
    500 Internal Server Error
    OracleJSP: An error occurred. Consult your application/system administrator for support. Programmers should consider setting the init-param debug_mode to "true" to see the complete exception message.
    How can see the exceptions I am getting. I mean how can I set the init-param debug_mode to "true".
    Thanks
    Krrish

    Normally application.log is where I look for problems. However this time there's nothing in the application.log file.
    I 'm trying a little experiment with how I build my .ear file. Usually I keep all the dependent jars of my webapp under WEB-INF/lib and then include the .war inside a .ear for command line deployment to Oracle application server (not OC4J standalone). Now I 'm trying place all my dependent library .jar files in the top directory of the .ear and then have a CLASSPATH entry in the .war's META-INF/MANIFEST.MF file to reference those jar files. This way multiple .war files inside my .ear then can reference a common set of jars without having to duplicate then under WEB-INF/lib of each war. Maven2 supports this type of packaging. In some forums this is called "skinny war" packaging.
    With this "skinny war" packaging, my .ear file deploys without errors using admin_client.jar (command line deployment) to the Oracle app server. However when I access the JSF page in one of my apps from the browser, I see this OracleJSP error asking me to set the debug parameter. NOTHING in the application.log file.
    On the application server host I don't have write permissions to all the application server directories (so I can set this debug param in soe global file) . I prefer being able to set this debug flag via my application's deployment plan file or web.xml.
    I have a workaround by making all the .wars inside my .ear "fat" i.e. they will have their own copies of the jars instead of sharing. I guess I can try to setup a OAS shared library and accomplish this too but with the "skinny" war approach the .ear is self contained.

  • Set image colour settings for multiple images

    In my workflow I place (Adobe)RGB images into InDesign. PDF export takes care of the RGB to CMYK conversion (convert to destination with preserve numbers).
    However this uses the default rendering intent for every conversion: relative colorimetric.
    For images, i want to use perceptual.
    Is there a way to quickly select all images and change the rendering intent?
    All the images have the same ojbect style. Unfortunately i could not find a way to couple the rendering intent to the object style.

    You can do it it via Assign Profiles...
    It can also be scripted, something like this AppleScript:
    tell application "Adobe InDesign CS6"
        tell active document
            set imgs to all graphics
            repeat with x from 1 to count imgs
                if class of item x of imgs is image then
                    try
                        set image rendering intent of item x of imgs to perceptual
                    end try
                end if
            end repeat
        end tell
    end tell

Maybe you are looking for