This topic is locked
[SOLVED]

 Using XT.Assign

12/3/2010 9:29:56 AM
ASPRunnerPro General questions
R
roberta author

hello, i hope this is the right place to be.
I am new to asp runner, just downloaded three days ago and have the following code in my project and it doesn't work. I reviewed almost all

relevant pages and help file. I just can't see the problem. Basically, if a user logins in that has Manager or admin access (998 and 999) then the button should be enabled, otherwise it should be disabled.
In the editor (html mode):

{BEGIN administration_link}<SPAN class=buttonborder><INPUT class=button value="Administration" type=button {$administration_attrs}></SPAN>{END administration_link}
In after login event:

' I started with this

xt.assign "administration_link",Cint(SESSION("Access_LVL")) > 990)
then thought of simplifying. I if put a reponse.write (and END) inside the if, the value is correct for a given login
if Cint(session("Access_LVL") < 998) then

xt.assign "administration_link",false

else

xt.assign "administration_link",true

end if
Now, if the button is enabled and clicked, then the user should be redirected to an admin page. This one I can't even figure out at all. I know it would have something to do with an onclick and href, but I don't know where to put it.
i hope someone can help, this seems like a great tool for quick db development.
Roberta

Sergey Kornilov admin 12/3/2010

Make sure you add your code to BeforeDisplay event of the page where you want to hide/show this link.
If this doesn't help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

R
roberta author 12/3/2010



Make sure you add your code to BeforeDisplay event of the page where you want to hide/show this link.
If this doesn't help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.


Thank you, that worked perfectly - obviously need to review the events a little more. I also put the code for my onclick event here as well.
I am appreciative of the quick reponse and the assitance,
Roberta