Click here to Skip to main content
15,888,521 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: run ASP web application on remote computer Pin
Not Active27-Jan-12 6:50
mentorNot Active27-Jan-12 6:50 
GeneralRe: run ASP web application on remote computer Pin
Mabchour 198927-Jan-12 7:04
Mabchour 198927-Jan-12 7:04 
GeneralRe: run ASP web application on remote computer Pin
ZurdoDev27-Jan-12 10:03
professionalZurdoDev27-Jan-12 10:03 
GeneralRe: run ASP web application on remote computer Pin
Mabchour 198928-Jan-12 10:47
Mabchour 198928-Jan-12 10:47 
GeneralRe: run ASP web application on remote computer Pin
ZurdoDev30-Jan-12 2:14
professionalZurdoDev30-Jan-12 2:14 
AnswerRe: run ASP web application on remote computer Pin
Ankit Maini31-Jan-12 21:22
Ankit Maini31-Jan-12 21:22 
AnswerRe: run ASP web application on remote computer Pin
Sankalp Deep1-Feb-12 9:03
Sankalp Deep1-Feb-12 9:03 
QuestionHow to create dropdownlist with many database in asp.net Pin
kongkiki26-Jan-12 20:42
kongkiki26-Jan-12 20:42 
Hi... I am creating search function in my web. I create a dropdownlist, textbox and button. This is my code:
ASP.NET
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true"
 OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
     <asp:ListItem></asp:ListItem>
     <asp:ListItem Value="Pelanggan Rumah"></asp:ListItem>
     <asp:ListItem Value="Kios Air"></asp:ListItem>
</asp:DropDownList>

<asp:TextBox ID="CariText" runat="server" Width="100px" Height="23px" CssClass="text_boxt_search"></asp:TextBox>

<asp:Button ID="Find" runat="server" Text="Search" Width="61px" CssClass="style105"  Height="25px" />


<asp:SqlDataSource ID="SqlDataSourceCustomer" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ATBGISMAPDBConnectionString %>" 
    SelectCommand="SELECT * FROM [DBCUSTOMER] WHERE ([CUST_NAME] LIKE '%' + @CUST_NAME + '%')">
    <SelectParameters>
    <asp:ControlParameter ControlID="CariText" Name="CUST_NAME" PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource ID="SqlDataSourceKiosk" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ATBGISMAPDBConnectionString %>" 
    SelectCommand="SELECT * FROM [KIOSK] WHERE ([Cust_Name] LIKE '%' + @Cust_Name + '%')">
    <SelectParameters>
    <asp:ControlParameter ControlID="CariText" Name="Cust_Name" PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:SqlDataSource>


And this in the controller:
VB
Public Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
        Dim strConnect As String = Nothing
        strConnect = Session("Data Source=192.168.1.88;Initial Catalog=ATBGISMAPDB;Persist Security Info=True;User ID=gis;Password=Pa5word@tb")

        Dim a As String = "SqlDataSourceCustomer"
        Dim b As String = "SqlDataSourceTank"
        Dim c As String = "SqlDataSourceKiosk"
        Dim d As String = "Pipa"

        If DropDownList1.SelectedItem.Value = a Then
            Query = "SELECT * FROM DBCUSTOMER where a = '" & LabelDDL.Text & "'"
        ElseIf DropDownList1.SelectedItem.Value = c Then
            Query = "SELECT * FROM KIOSK where c = '" & LabelDDL.Text & "'"
        End If
    End Sub

But the script not can yet working i mean. Do Anyone can help me? Smile | :)
AnswerRe: How to create dropdownlist with many database in asp.net Pin
Not Active27-Jan-12 1:30
mentorNot Active27-Jan-12 1:30 
AnswerRe: How to create dropdownlist with many database in asp.net Pin
ZurdoDev27-Jan-12 10:10
professionalZurdoDev27-Jan-12 10:10 
QuestionStop automatic Movement of Raddock Pin
yasirabbas01326-Jan-12 2:55
yasirabbas01326-Jan-12 2:55 
AnswerRe: Stop automatic Movement of Raddock Pin
R. Giskard Reventlov26-Jan-12 12:11
R. Giskard Reventlov26-Jan-12 12:11 
QuestionCalculating gridview colum values Pin
Harshini8125-Jan-12 17:38
Harshini8125-Jan-12 17:38 
AnswerRe: Calculating gridview colum values Pin
thatraja26-Jan-12 2:09
professionalthatraja26-Jan-12 2:09 
AnswerRe: Calculating gridview colum values Pin
jkirkerx28-Jan-12 8:25
professionaljkirkerx28-Jan-12 8:25 
QuestionWeb Services Questions in ASP.NET Pin
CrazyPepperoni25-Jan-12 17:21
CrazyPepperoni25-Jan-12 17:21 
AnswerRe: Web Services Questions in ASP.NET Pin
jkirkerx26-Jan-12 11:58
professionaljkirkerx26-Jan-12 11:58 
Questionsource code formatter Pin
softramesh25-Jan-12 7:00
softramesh25-Jan-12 7:00 
AnswerRe: source code formatter Pin
thatraja26-Jan-12 2:13
professionalthatraja26-Jan-12 2:13 
QuestionAttempted to read or write protected memory Pin
abbd25-Jan-12 4:50
abbd25-Jan-12 4:50 
AnswerRe: Attempted to read or write protected memory Pin
R. Giskard Reventlov25-Jan-12 5:08
R. Giskard Reventlov25-Jan-12 5:08 
GeneralRe: Attempted to read or write protected memory Pin
abbd25-Jan-12 5:26
abbd25-Jan-12 5:26 
AnswerRe: Attempted to read or write protected memory Pin
Ankit Maini31-Jan-12 1:05
Ankit Maini31-Jan-12 1:05 
QuestionOption Strict On disallows late binding Pin
Seema Bawa24-Jan-12 6:49
Seema Bawa24-Jan-12 6:49 
AnswerRe: Option Strict On disallows late binding Pin
jesarg25-Jan-12 6:19
jesarg25-Jan-12 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.