0

Hello All,

I just want to know how Can I disable button for some conditions? Say, if I have session- Val. If its -1 then button must be disabled otherwise Enable..

Thanks,
Hakoo Desai...

3
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by code739
0

i just want you to clarrify your problem: can you clarrify your case/sirtuation more.
=)

0
<%
if Session("SessionVariable") <> "ValueWanted" then
    theButton = "disabled"
else
    'who cares
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>button</title>
</head>

<body>

<input name="Button1" type="button" value="button" <%= theButton %>  />

</body>

</html>

Edited by PapaJohn42: fix code

0
        <%
        > if Session("SessionVariable") <> 1 then
        >     theButton = "disabled = disabled"
        > else
        >     theButton = ""
        > end if
        > %>

        > <html>
        > <head>
        > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        > <title>button</title>
        > </head>
        > <body>
        > <input name="Button1" type="button" value="button" <%= theButton %>  />
        > </body>
        > </html>



/*how about this?..hope it help
if its not,
i just wanna ask some question where could you get the "valueWanted or 1" from the database?
can you explain me further the front end situation.?*/

Edited by code739

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.