Addlink

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Danny

Addlink

Post by Danny »

Hi,

How to hide the addlink in the page_load?

Regards.


Webmaster
User
Posts: 9425

Post by Webmaster »

Currently it is not possible. You will need to add codes around the AddLink to handle. For example:

<% If <Condition> Then %>
<Add Link>
<% End If %>

We will consider in future versions.


RobWatson
User
Posts: 5

Post by RobWatson »

(using version 10.2)

Is is still not possible to do this? I want to change the list table so that for one of the tables users can only add or edit using the master/detail page, not the simple master page. I've successfully changed the edit links using ListOptions_Load and ListOptions_Rendered events, but have had to resort to manually hacking the generated xxxlist.cshtml file with an ugly if (false)... to remove the "Add" link.

Alternatively, is there a way to force the option of showdetail=xxx in the add page when it is selected using URL showdetail=&ID=nnn


Webmaster
User
Posts: 9425

Post by Webmaster »

In v11, you can hide the add link using:

OtherOptions["addedit"]["add"].Visible = false; // C#


Danny
User
Posts: 138

Post by Danny »

Hi,

We use vb language:

OtherOptions["addedit"]["add"].Visible = false; returns an error: Compiler Error Message: BC30454: Expression is not a method.

Use:

At the listpage-Page render:

OtherOptions("addedit")("add").Visible = False

Regards.


lyctysplt
User
Posts: 15

Post by lyctysplt »

I've added that code to the list render - and it works fine.-- when I try to add it to the view render part - it doesn't seem to work - Gives a "Given Key was not present in the dictionary" error


motfs
User
Posts: 258

Post by motfs »

In View Page, use the following code in the Page_Render server event (C#):

OtherOptions["action"]["add"].Visible = false;


Post Reply