Click here to Skip to main content
15,892,927 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to email in asp 2.0 [modified] Pin
swguy2328-Feb-07 21:33
swguy2328-Feb-07 21:33 
AnswerRe: how to email in asp 2.0 Pin
Vasudevan Deepak Kumar4-Mar-07 2:27
Vasudevan Deepak Kumar4-Mar-07 2:27 
Question.NET Security across servers Pin
JP01128-Feb-07 11:17
JP01128-Feb-07 11:17 
QuestionSearch specific Column of a database Pin
shravan2828-Feb-07 10:26
shravan2828-Feb-07 10:26 
AnswerRe: Search specific Column of a database Pin
Naveed Kamboh28-Feb-07 10:32
Naveed Kamboh28-Feb-07 10:32 
GeneralRe: Search specific Column of a database Pin
shravan2828-Feb-07 10:41
shravan2828-Feb-07 10:41 
GeneralRe: Search specific Column of a database Pin
Naveed Kamboh28-Feb-07 22:38
Naveed Kamboh28-Feb-07 22:38 
AnswerRe: Search specific Column of a database [modified] Pin
IamMohan28-Feb-07 23:09
IamMohan28-Feb-07 23:09 
Hi,

Follow the steps below:
Create a following stored Procedure in SQL Server 2000/2005. Give the table name(In the Procedure) you want to query

<font color="blue"><br />
      CREATE  PROCEDURE [dbo].[TEST_PARAM] <br />
      <br />
      @Param varchar(100)<br />
      AS<br />
      BEGIN<br />
          declare @dynamicQuery NVARCHAR(4000)<br />
          set @dynamicQuery = 'Select ' + @Param + ' from TABLE_NAME '<br />
          exec sp_executesql @dynamicQuery<br />
      END<br />
      </font>



2> This above store procedure will return all the values in the column you passed as a parameter.

3> On the server click of the Search button call this stored procedure by passing the columnName as in the table as a parameter and fill the values returned by the stored procedure in a DataSet ds.

4> Any have you know the columnName the user selected, use the same name in the select filter, like:

  <br />
<font color="blue">           <br />
GridView1.DataSource = ds.Tables[0].DefaultView.RowFilter = "ColumName = '" + txtSearchBox.Text.Trim()+ "'";<br />
</font>


5> Then the the grid View will be binded with the needed values.


Thatz it. Blush | :O



M-o-h-a-n

QuestionAdvice needed on contractor... Pin
thisnamesux28-Feb-07 10:09
thisnamesux28-Feb-07 10:09 
AnswerRe: Advice needed on contractor... Pin
Naveed Kamboh28-Feb-07 10:24
Naveed Kamboh28-Feb-07 10:24 
AnswerRe: Advice needed on contractor... Pin
Christian Graus28-Feb-07 10:57
protectorChristian Graus28-Feb-07 10:57 
Questioncreating an online forum Pin
shawn41428-Feb-07 9:49
shawn41428-Feb-07 9:49 
AnswerRe: creating an online forum Pin
Naveed Kamboh28-Feb-07 10:16
Naveed Kamboh28-Feb-07 10:16 
AnswerRe: creating an online forum Pin
M A A Mehedi Hasan28-Feb-07 20:41
M A A Mehedi Hasan28-Feb-07 20:41 
AnswerRe: creating an online forum Pin
Vasudevan Deepak Kumar4-Mar-07 2:29
Vasudevan Deepak Kumar4-Mar-07 2:29 
QuestionForms Authentication with Active Directory LDAP Problem Pin
rock05628-Feb-07 9:21
rock05628-Feb-07 9:21 
QuestionCube File Connection string ? Pin
_mubashir28-Feb-07 8:36
_mubashir28-Feb-07 8:36 
AnswerRe: Cube File Connection string ? Pin
Vasudevan Deepak Kumar4-Mar-07 2:29
Vasudevan Deepak Kumar4-Mar-07 2:29 
QuestionProblem with project upload Pin
srinandan..28-Feb-07 6:47
srinandan..28-Feb-07 6:47 
AnswerRe: Problem with project upload Pin
Vasudevan Deepak Kumar4-Mar-07 2:30
Vasudevan Deepak Kumar4-Mar-07 2:30 
QuestionGridView Delete() with ObjectDataSource Pin
Taurian11028-Feb-07 6:33
Taurian11028-Feb-07 6:33 
AnswerRe: GridView Delete() with ObjectDataSource Pin
Naveed Kamboh28-Feb-07 10:30
Naveed Kamboh28-Feb-07 10:30 
GeneralRe: GridView Delete() with ObjectDataSource Pin
Taurian1105-Mar-07 4:58
Taurian1105-Mar-07 4:58 
GeneralRe: GridView Delete() with ObjectDataSource Pin
Naveed Kamboh5-Mar-07 6:24
Naveed Kamboh5-Mar-07 6:24 
QuestionSorting a dynamically created GridView [modified] Pin
darren2428-Feb-07 6:21
darren2428-Feb-07 6:21 

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.