Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Advanced Search in database [modified]

Advanced Search in database [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasecssasp-netsql-server
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hassanmorsy
    wrote on last edited by
    #1

    hello, I want code in asp.net using c# for web application searching in the database for articles. for example: the sql server database contain columns for (Title, SubTitle, Author, Category, Date, Lead, Body, ImageURL,...) for the articles... and I want to make web form which can search in this database with more option where user can search by Title, SubTitle, Author, Category, Date, and so on.... can I get help, pls... I use linq technique I made these files

    Searhc.aspx
    <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Templates/Level_Two.master"
    AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Admin_CMS_Article_Search" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">

    </style>
    

    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td height="15">
     
    </td>
    </tr>
    <tr>
    <td class="Searchby" height="50">
    Search by Article Name:
    </td>
    </tr>
    <tr>
    <td>
     
    </td>
    </tr>
    <tr>
    <td>
    <table cellpadding="0" cellspacing="0" class="style1">
    <tr>
    <td width="100">
     </td>
    <td>
    <asp:TextBox ID="txtSearch" runat="server" Width="396px"></asp:TextBox>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td height="30">
     
    </td>
    </tr>
    <tr>
    <td>
    <table cellpadding="0" cellspacing="0" class="style1">
    <tr>
    <td width="250">
     </td>
    <td>
    <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
    </td>
    </tr>

    R N R 4 Replies Last reply
    0
    • H hassanmorsy

      hello, I want code in asp.net using c# for web application searching in the database for articles. for example: the sql server database contain columns for (Title, SubTitle, Author, Category, Date, Lead, Body, ImageURL,...) for the articles... and I want to make web form which can search in this database with more option where user can search by Title, SubTitle, Author, Category, Date, and so on.... can I get help, pls... I use linq technique I made these files

      Searhc.aspx
      <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Templates/Level_Two.master"
      AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Admin_CMS_Article_Search" %>

      <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
      <style type="text/css">

      </style>
      

      </asp:Content>
      <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
      <table cellpadding="0" cellspacing="0" width="100%">
      <tr>
      <td height="15">
       
      </td>
      </tr>
      <tr>
      <td class="Searchby" height="50">
      Search by Article Name:
      </td>
      </tr>
      <tr>
      <td>
       
      </td>
      </tr>
      <tr>
      <td>
      <table cellpadding="0" cellspacing="0" class="style1">
      <tr>
      <td width="100">
       </td>
      <td>
      <asp:TextBox ID="txtSearch" runat="server" Width="396px"></asp:TextBox>
      </td>
      </tr>
      </table>
      </td>
      </tr>
      <tr>
      <td height="30">
       
      </td>
      </tr>
      <tr>
      <td>
      <table cellpadding="0" cellspacing="0" class="style1">
      <tr>
      <td width="250">
       </td>
      <td>
      <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
      </td>
      </tr>

      R Offline
      R Offline
      RaviRanjanKr
      wrote on last edited by
      #2

      Please Use "pre" tag to wrapped your code to make it readability.

      H 1 Reply Last reply
      0
      • H hassanmorsy

        hello, I want code in asp.net using c# for web application searching in the database for articles. for example: the sql server database contain columns for (Title, SubTitle, Author, Category, Date, Lead, Body, ImageURL,...) for the articles... and I want to make web form which can search in this database with more option where user can search by Title, SubTitle, Author, Category, Date, and so on.... can I get help, pls... I use linq technique I made these files

        Searhc.aspx
        <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Templates/Level_Two.master"
        AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Admin_CMS_Article_Search" %>

        <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
        <style type="text/css">

        </style>
        

        </asp:Content>
        <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
        <td height="15">
         
        </td>
        </tr>
        <tr>
        <td class="Searchby" height="50">
        Search by Article Name:
        </td>
        </tr>
        <tr>
        <td>
         
        </td>
        </tr>
        <tr>
        <td>
        <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
        <td width="100">
         </td>
        <td>
        <asp:TextBox ID="txtSearch" runat="server" Width="396px"></asp:TextBox>
        </td>
        </tr>
        </table>
        </td>
        </tr>
        <tr>
        <td height="30">
         
        </td>
        </tr>
        <tr>
        <td>
        <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
        <td width="250">
         </td>
        <td>
        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
        </td>
        </tr>

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        hassanmorsy wrote:

        I want code in asp.net using c#

        It is extremely ride to start demanding code to solve your problem. I doubt you get many responses. Format your code snippets. Again, you will get few responses if no one can read your question.


        I know the language. I've read a book. - _Madmatt

        H 1 Reply Last reply
        0
        • R RaviRanjanKr

          Please Use "pre" tag to wrapped your code to make it readability.

          H Offline
          H Offline
          hassanmorsy
          wrote on last edited by
          #4

          thanks RaviRanjankr.. I did it..

          1 Reply Last reply
          0
          • N Not Active

            hassanmorsy wrote:

            I want code in asp.net using c#

            It is extremely ride to start demanding code to solve your problem. I doubt you get many responses. Format your code snippets. Again, you will get few responses if no one can read your question.


            I know the language. I've read a book. - _Madmatt

            H Offline
            H Offline
            hassanmorsy
            wrote on last edited by
            #5

            thanks Mark, I finished formating the code.. now it appear more readable...

            1 Reply Last reply
            0
            • H hassanmorsy

              hello, I want code in asp.net using c# for web application searching in the database for articles. for example: the sql server database contain columns for (Title, SubTitle, Author, Category, Date, Lead, Body, ImageURL,...) for the articles... and I want to make web form which can search in this database with more option where user can search by Title, SubTitle, Author, Category, Date, and so on.... can I get help, pls... I use linq technique I made these files

              Searhc.aspx
              <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Templates/Level_Two.master"
              AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Admin_CMS_Article_Search" %>

              <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
              <style type="text/css">

              </style>
              

              </asp:Content>
              <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
              <table cellpadding="0" cellspacing="0" width="100%">
              <tr>
              <td height="15">
               
              </td>
              </tr>
              <tr>
              <td class="Searchby" height="50">
              Search by Article Name:
              </td>
              </tr>
              <tr>
              <td>
               
              </td>
              </tr>
              <tr>
              <td>
              <table cellpadding="0" cellspacing="0" class="style1">
              <tr>
              <td width="100">
               </td>
              <td>
              <asp:TextBox ID="txtSearch" runat="server" Width="396px"></asp:TextBox>
              </td>
              </tr>
              </table>
              </td>
              </tr>
              <tr>
              <td height="30">
               
              </td>
              </tr>
              <tr>
              <td>
              <table cellpadding="0" cellspacing="0" class="style1">
              <tr>
              <td width="250">
               </td>
              <td>
              <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
              </td>
              </tr>

              R Offline
              R Offline
              RaviRanjanKr
              wrote on last edited by
              #6

              it's not possible to write whole code for you but you can focus on given ideas I suggest you to customize your code by adding functionality to user to select their option as you mention title,date,author,subtitle,body. for this goal you can use various control Checkbox,Combobox or even Radiobutton with assigning corresponding value. when use select any one option then Value should fire and passed it into parameter where you are using "Title" [Right now]. Please navigate the given link to know more Link[^]

              modified on Tuesday, January 4, 2011 11:55 AM

              1 Reply Last reply
              0
              • H hassanmorsy

                hello, I want code in asp.net using c# for web application searching in the database for articles. for example: the sql server database contain columns for (Title, SubTitle, Author, Category, Date, Lead, Body, ImageURL,...) for the articles... and I want to make web form which can search in this database with more option where user can search by Title, SubTitle, Author, Category, Date, and so on.... can I get help, pls... I use linq technique I made these files

                Searhc.aspx
                <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Templates/Level_Two.master"
                AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Admin_CMS_Article_Search" %>

                <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
                <style type="text/css">

                </style>
                

                </asp:Content>
                <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
                <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                <td height="15">
                 
                </td>
                </tr>
                <tr>
                <td class="Searchby" height="50">
                Search by Article Name:
                </td>
                </tr>
                <tr>
                <td>
                 
                </td>
                </tr>
                <tr>
                <td>
                <table cellpadding="0" cellspacing="0" class="style1">
                <tr>
                <td width="100">
                 </td>
                <td>
                <asp:TextBox ID="txtSearch" runat="server" Width="396px"></asp:TextBox>
                </td>
                </tr>
                </table>
                </td>
                </tr>
                <tr>
                <td height="30">
                 
                </td>
                </tr>
                <tr>
                <td>
                <table cellpadding="0" cellspacing="0" class="style1">
                <tr>
                <td width="250">
                 </td>
                <td>
                <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
                </td>
                </tr>

                R Offline
                R Offline
                rt2800
                wrote on last edited by
                #7

                Can't you use Full text search capability of SQLServer? Check Blog post at this[^] URL for possible solution

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups