Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Lydia Hughes   on Jan 05 In Asp.net Category.

  
Question Answered By: Raju Srinivas   on Jan 05

If Not Page.IsPostBack Then
Dim ConnectionString As String = "Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=ATSCNETSuprt;Data Source=vsdotnet2003;Packet
Size=4096"
Dim CommandText3 As String = "select Distinct StartDate from
WorkLogs Where (NetworkEng = '" & strNetEng & "') ORDER BY StartDate DESC"

Dim myConnection As New SqlConnection(ConnectionString)
Dim myCommand3 As New SqlCommand(CommandText3, myConnection)

DropDownList1.DataTextField = "StartDate"

myConnection.Open()

DropDownList1.DataSource =
myCommand3.ExecuteReader(CommandBehavior.CloseConnection)
DropDownList1.DataBind()
End If

Then:

<!-- <asp:ButtonColumn Text="Delete" CommandName="Delete"
ItemStyle-Font-Size="smaller" ItemStyle-Width="10%"></asp:ButtonColumn> -->
<Font size=+1><B><asp:Label id="netEngLbl"
runat="server"></asp:Label></b></FONT> <asp:Label id="Message1"
ForeColor="red" EnableViewState="false" width="80%" runat="server"></asp:Label>

<hr>
<Span class="DashDateGroup"><font size=+1>Select Date</font>:
<BR></span>
<asp:DropDownList id="DropDownList1" Coluns=15
runat="server"></asp:DropDownList>
 
<asp:Button id="Button1" onclick="ApplyFilter_Click"
runat="server" Text="Show Records"></asp:Button>
<HR>

</Form>

Share: 

 
 
Didn't find what you were looking for? Find more on Front Page Drop-down Menu to query Access DB Or get search suggestion and latest updates.


Tagged: