i try to search records in asp.net for this first i create sp
ALTER procedure [dbo].[spsearchdocuments]
@Name nvarchar(50)
as
SELECT dbo.DocumentInfo.DocID as DocumentID,
dbo.DocumentInfo.DocName as DocumentName,
dbo.DocumentInfo.Uploadfile as FileUploaded,
dbo.DocumentInfo.UploadedDate as UploadedDate,
dbo.Department.DepType as Department,
dbo.DocType.DocType as Document,
dbo.DocumentInfo.UploadedBy as UploadedBy,
dbo.Approval.AppoveBy, dbo.ApproveType.ApproveType as Status
FROM dbo.DocumentInfo INNER JOIN
dbo.Approval ON dbo.DocumentInfo.DocID = dbo.Approval.DocID INNER JOIN
dbo.ApproveType ON dbo.Approval.ApproveID = dbo.ApproveType.ApproveID INNER JOIN
dbo.Department ON dbo.DocumentInfo.DepID = dbo.Department.DepID INNER JOIN
dbo.DocType ON dbo.DocumentInfo.DocTypeID = dbo.DocType.DocTypeID
where [DocName] like @Name+'%'
and then when i call this sp in funtion like this
public DataTable searchdcouments(string Name )
{
return db.ExecuteDataSet("spsearchdocuments", new object[] { Name }).Tables[0];
}
and when i call this funtion in .aspx form behind search button like this
protected void Btn_submits_Click(object sender, EventArgs e)
{
Repeater4.DataSource = sear.searchdcouments(searz.Text);
Repeater4.DataBind();
}
and when i debug my project and write keyword then it not show me any record where record exist in database have a look below pictures when i enter keyword keyword
image1[
^]
and when i click on search button it shows me like this show no records.
image2[
^]