Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
Tradução
Original
Este tópico ainda não foi avaliado como - Avalie este tópico

DayRenderEventArgs.SelectUrl Propriedade

Gets the script used to post the page back to the server when the date being rendered is selected in a Calendar control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (em System.Web. dll)

public string SelectUrl { get; }

Valor da propriedade

Tipo: System.String

The script Used to postagem the página Voltar to the servidor when the Date being rendered is Selecionadodo.

Use the SelectUrl property to retrieve the script used to post the page back to the server when the date being rendered is selected in a Calendar control.Essa propriedade normalmente é usada quando você deseja personalizar o conteúdo processado para uma data, mas ainda deseja manter o comportamento de postagem.

O exemplo de código a seguir demonstra como personalizar o conteúdo processado para data de hoje.The value of the SelectUrl property is inserted into the rendered content so that the Calendar control will post back to the server when the user selects today's date.

<!DOCTYPE html PUBLIC "-
    "http:
<script runat=>

   ScheduleCalendar_DayRender(object sender, DayRenderEventArgs e)
  {
    
    (e.Day.IsToday)
    {
      
      
      
      
      string dayContent = " + e.SelectUrl +
        ><img border=\ alt=\ src=\/></a>";

      
      e.Cell.Text = dayContent;
    }

  }

</script>

<html xmlns="http:
  <head runat=>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id= runat=>

      <asp:calendar id=
        ondayrender= 
        runat=/> 

    </form>
  </body>
</html>


Isso foi útil para você?
(1500 caracteres restantes)

Contribuições da comunidade

ADICIONAR
© 2013 Microsoft. Todos os direitos reservados.