| |

VerySource

 Forgot password?
 Register
Search
View: 703|Reply: 7

How to implement the hidden control of the custom control

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-28 18:00:01
| Show all posts |Read mode
I dragged a custom control into a page, <% @ Register TagPrefix = "uc1" TagName = "Message" Src = "WebUserControl / Message.ascx"%>, how do I get the ID of the control and implement it? Hidden in display
Reply

Use magic Report

0

Threads

58

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-3-2 10:00:01
| Show all posts
<uc1: Message id = "myMsg" runat = "server" /> The id is defined by you. As for how to hide it, it depends on how your custom control does it.
Reply

Use magic Report

0

Threads

64

Posts

35.00

Credits

Newbie

Rank: 1

Credits
35.00

 China

Post time: 2020-3-2 17:30:01
| Show all posts
You post less code to declare instances, similar to:
  <uc1: Message id = abc runat = server Visible = "true" ...... />
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-3-3 21:30:01
| Show all posts
sorry, the code is:

<uc1: WebControlHeader id = "WebControlHeader1" runat = "server"> </ uc1: WebControlHeader>
Reply

Use magic Report

0

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-6 22:15:01
| Show all posts
WebControlHeader1.Visible = true;
Reply

Use magic Report

0

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-7 02:00:01
| Show all posts
Write in the control, this.Visible = true;
Reply

Use magic Report

0

Threads

43

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-3-7 12:30:02
| Show all posts
Put in div
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-3-21 21:00:01
| Show all posts
Thank you all, WebControlHeader1 has no properties. Inspired by theyfacmilanproposal, the problem was solved.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list