Click here to Skip to main content
15,889,693 members
Home / Discussions / Web Development
   

Web Development

 
QuestionWCF Service having client URL as SSL, how to access the Service Pin
Prabakar11-Dec-14 2:04
Prabakar11-Dec-14 2:04 
AnswerRe: WCF Service having client URL as SSL, how to access the Service Pin
Dominic Burford30-Dec-14 22:15
professionalDominic Burford30-Dec-14 22:15 
QuestionHow do I insert my own text into this script? Pin
Madaxe19-Dec-14 19:42
Madaxe19-Dec-14 19:42 
AnswerRe: How do I insert my own text into this script? Pin
Kornfeld Eliyahu Peter9-Dec-14 20:32
professionalKornfeld Eliyahu Peter9-Dec-14 20:32 
AnswerRe: How do I insert my own text into this script? Pin
S Services12-Dec-14 21:08
S Services12-Dec-14 21:08 
QuestionCan i cache all dynamically generated pages and serve them as pure HTML? Pin
Member 112915226-Dec-14 13:19
Member 112915226-Dec-14 13:19 
AnswerRe: Can i cache all dynamically generated pages and serve them as pure HTML? Pin
Anurag Gandhi31-May-15 2:37
professionalAnurag Gandhi31-May-15 2:37 
Questionvb 2010 web form sql control problem Pin
dcof4-Dec-14 10:17
dcof4-Dec-14 10:17 
XML
In a vB.NET 2010 web form application, I am changing an existing web page. I want the user to be able to select various customers
based upon if the first name, last name, or middle names are selected. The idea is for the user to select one, two, and/or three
of the parameters and hit the search key.

The problem is the results only return data based upon only one parameter. If data for more than one paramter is selected, the  selection
criteria is ignored.
When I run the sql in sql server management studio, I get the results I want.

Thus can you tell me what I can do to solve the problem?

The code that is having the error is listed below;
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Support.aspx.vb" Inherits="letters_Support" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MPHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MPContent" Runat="Server">
<asp:Panel runat="server" ID="pnlSupport">
   <h3 style="text-align: center; border-style:none; ">Support Page</h3>

      <table style="width: 100%;">
          <tr>
            <td>
               Last Name:
            </td>
            <td>
               <asp:TextBox ID="lname" runat="server"></asp:TextBox>
            </td>
            <td>
                First Name:
            </td>
            <td>
               <asp:TextBox ID="fname" runat="server"></asp:TextBox>
            </td>
            <td>
                 Middle Name:
            </td>
            <td>
               <asp:TextBox ID="mname" runat="server"></asp:TextBox>
            </td>
             <td>
                Search by Name:
            </td>
            <td>
               <asp:Button ID="btnSearch" runat="server" Text="Search" />
            </td>
        </tr>
    </table>
    <br />
      <asp:GridView ID="GridViewSupport" runat="server" AutoGenerateColumns="False"
        PageSize="25"
        GridLines="Both"
        EnableSortinAndPagingCallbacks="true"
        HeaderStyle-CssClass="ui-widget-header"
        PagerStyle-CssClass="ui-widget ui-widget-content"
        Width="100%"
        EmptyDataText="No records were selected."
        DataSourceID="sqlTEST" AllowPaging="True" AllowSorting="True" >
        <Columns>
            <asp:BoundField DataField="lastName" HeaderText="Last Name" SortExpression="lastName" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="ui-widget-content" ControlStyle-CssClass="text required ui-widget-content ui-corner-all"/>
            <asp:BoundField DataField="firstName" HeaderText="First Name" SortExpression="firstName" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="ui-widget-content" ControlStyle-CssClass="text required ui-widget-content ui-corner-all"/>
            <asp:BoundField DataField="middleName" HeaderText="Middle Name" SortExpression="middleName" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="ui-widget-content" ControlStyle-CssClass="text required ui-widget-content ui-corner-all"/>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="sqlTEST" runat="server"
    ConnectionString="<%$ ConnectionStrings:sqlTEST %>" SelectCommand="SELECT [lastName]
            ,[firstName]
            ,[middleName]
            ,[suffix]
            ,a.[userid]
            from [TEST].[dbo].[Identity]
              where ([lastName] like  '%' + @lname  + '%' and
                   [firstName] like'%' + @fname + '%' and
           [middleName]  like'%' + @mname + '%')
           or ([lastName] like  '%' + @lname  + '%' and
                   [firstName] like'%' + @fname + '%'  and
                   @mname is null)
           or ([lastName] like  '%' + @lname  + '%' and
                   [middleName] like'%' + @mname + '%'  and
                   @fname is null)
               or ([firstName] like  '%' + @fname  + '%' and
                   [middleName] like'%' +  @mname + '%' and
                   @lname is null)
               or ([lastName] like  '%' + @lname  + '%' and
                   @fname is null and
                   @mname is null)
        or (@lname is null and
                   [firstName] like'%' +  @fname + '%' and
                   @mname is null)
                or (@lname is null and
                   @fname is null and
                   [middleName] like'%' +  @mname + '%')
               or (@fname is null and @lname is null and @mname is null)
          order by  [lastName], [firstName], [middleName]"
        CancelSelectOnNullParameter="false"  >
    <SelectParameters>
        <asp:ControlParameter ControlID="lname" Name="lname" PropertyName="Text" ConvertEmptyStringToNull="true" />
        <asp:ControlParameter ControlID="fname" Name="fname" PropertyName="Text" ConvertEmptyStringToNull="true" />
        <asp:ControlParameter ControlID="mname" Name="mname" PropertyName="Text" ConvertEmptyStringToNull="true" />
    </SelectParameters>
</asp:SqlDataSource>
  </asp:Panel>
</asp:Content>

AnswerRe: vb 2010 web form sql control problem Pin
Richard Deeming4-Dec-14 10:32
mveRichard Deeming4-Dec-14 10:32 
Questionadding jquery at a joomla's module backend code Pin
isengart3-Dec-14 23:04
isengart3-Dec-14 23:04 
QuestionEditing Elements Using Iframe Pin
MadDashCoder3-Dec-14 19:24
MadDashCoder3-Dec-14 19:24 
GeneralMessage Closed Pin
30-Nov-14 2:23
Janak197730-Nov-14 2:23 
GeneralRe: Next milestone in website development Pin
Dave Kreskowiak1-Dec-14 2:36
mveDave Kreskowiak1-Dec-14 2:36 
QuestionLearning & improving web application skills Pin
Angel Hermon27-Nov-14 8:18
Angel Hermon27-Nov-14 8:18 
QuestionPath to CSS Not Working Pin
MadDashCoder24-Nov-14 11:11
MadDashCoder24-Nov-14 11:11 
AnswerRe: Path to CSS Not Working Pin
User 171649224-Nov-14 13:18
professionalUser 171649224-Nov-14 13:18 
GeneralRe: Path to CSS Not Working Pin
MadDashCoder24-Nov-14 16:24
MadDashCoder24-Nov-14 16:24 
AnswerRe: Path to CSS Not Working Pin
MadDashCoder3-Dec-14 18:43
MadDashCoder3-Dec-14 18:43 
QuestionINSPIRATION FOR DESIGN Pin
Member 1122910913-Nov-14 12:16
Member 1122910913-Nov-14 12:16 
AnswerRe: INSPIRATION FOR DESIGN Pin
PIEBALDconsult13-Nov-14 12:41
mvePIEBALDconsult13-Nov-14 12:41 
GeneralRe: INSPIRATION FOR DESIGN Pin
Richard MacCutchan13-Nov-14 22:17
mveRichard MacCutchan13-Nov-14 22:17 
AnswerRe: INSPIRATION FOR DESIGN Pin
Kornfeld Eliyahu Peter13-Nov-14 22:54
professionalKornfeld Eliyahu Peter13-Nov-14 22:54 
AnswerRe: INSPIRATION FOR DESIGN Pin
Nathan Minier14-Nov-14 2:14
professionalNathan Minier14-Nov-14 2:14 
GeneralRe: INSPIRATION FOR DESIGN Pin
Shamim Reza14-Dec-14 4:25
Shamim Reza14-Dec-14 4:25 
AnswerRe: INSPIRATION FOR DESIGN Pin
Rollin Shultz19-Dec-14 5:16
Rollin Shultz19-Dec-14 5:16 

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.