There is no way to implement it for now and an interesting small problem!

Source: Internet
Author: User

1. Problems not implemented at the moment:
The content in the Custom cell of the calendar control. I want to add a linkbutton-like control on each date. However, no matter how it is done, all events cannot be added. This control is dynamically generated, and a feature of the dynamically generated control is that the event must be loaded at each loading, but I failed to do so, I tried my best to add events.
I wrote a linkbutton and inherited it from the system. However, the events I added cannot be displayed on the calendar.
The book clearly states that ASP cannot be added to the cell of the calendar. . Net Control. Of course, some text or HTML is acceptable.
Now, the only feasible solution is to add HTML by yourself.CodeThe a mark is used for implementation. However, the trouble is not anything else, but its subsequent parameters and some content on the page. I'm speechless.

2. An interesting small problem:
I often use control. attribute. the add method is used to add properties similar to click for some controls. For example, if you want a control to pop up a dialog box when you click, you can use attriibute. add ("onclick", "alert ('message')"); for interesting things, we can also define some data: for example:
Attribute. Add ("thedatetime", datetime. Now. tostring ());
After that, use sender to retrieve the data in the returned event!
(Sender as linkbutton). Attribute ["thedatetime"] can retrieve this data... In this way, a good solution is provided for the above problems.

Finally, I want to solve the problem as follows:
Write a <a herf = "myfunction (this)" mydata = "mydata"> text </a>
Then process mydata in myfunction and return it to the server, which is similar to a linkbutton, but I don't know if it works! Try again .....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.