Click here to Skip to main content
15,908,674 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: My website take so long time to reponse the pages (Slow) Pin
Not Active2-Apr-11 3:19
mentorNot Active2-Apr-11 3:19 
GeneralRe: My website take so long time to reponse the pages (Slow) Pin
Hy Chanhan2-Apr-11 3:25
professionalHy Chanhan2-Apr-11 3:25 
GeneralRe: My website take so long time to reponse the pages (Slow) Pin
Not Active2-Apr-11 3:42
mentorNot Active2-Apr-11 3:42 
GeneralRe: My website take so long time to reponse the pages (Slow) Pin
Hy Chanhan2-Apr-11 3:47
professionalHy Chanhan2-Apr-11 3:47 
GeneralRe: My website take so long time to reponse the pages (Slow) Pin
Not Active2-Apr-11 4:22
mentorNot Active2-Apr-11 4:22 
AnswerRe: My website take so long time to reponse the pages (Slow) Pin
Dalek Dave2-Apr-11 6:17
professionalDalek Dave2-Apr-11 6:17 
Questionregarding webserver & database server & web application execution flow Pin
vijaylumar1-Apr-11 22:26
vijaylumar1-Apr-11 22:26 
QuestionProblem in displaying data. Pin
manikumar_gutti1-Apr-11 19:55
manikumar_gutti1-Apr-11 19:55 
Hi,
I am mani. I have a problem in display the data in datagrid.
What i did is I am creating a form and in this form i created a 6 textboxes and one search button. whenever the user enter a text in textbox i retrieve the data from the database and displayed in the datagrid.
The problem is when the user again enter the text in text box the datagrid is filled with new data and last data will be lost. But i want that newly searching data should be displayed in datagrid including the last searching data.

This is my problem i sent last time to this portal. i got some answers. But using the DataTable i didnt get the answer. I write my code here. please tell me what is the wrong i did it in this.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class AdvanceSearch : System.Web.UI.Page
{
SqlConnection con;
SqlCommand cmd;
SqlDataAdapter adptr;
DataTable dt;
DataView dv;


protected void Page_Load(object sender, EventArgs e)
{
if (Session["mani"] == null)
{
dt = new DataTable();
Session["mani"] = dt;
}
else
{
dt = (DataTable)Session["mani"];
}
dv = new DataView(dt);
SearchResultGrid.DataSource = dv;
SearchResultGrid.DataBind();

}
protected void ButtonSearch_Click(object sender, EventArgs e)
{
con = new SqlConnection("Data Source=MVB;Initial Catalog=Communication; Integrated Security=True");
string select_query = "SELECT *FROM CommunicationDetails WHERE CommunicationId=@comid OR IssueType=@issue OR RegionName=@regname OR ApplicationName=@appname OR Descript=@Desc OR CommunicationDate=@comdate";
cmd = new SqlCommand(select_query, con);
cmd.Parameters.Add("@comid", TextBoxCommunicationID.Text);
cmd.Parameters.Add("@issue", TextIssueType.Text);
cmd.Parameters.Add("@regname", TextBoxRegionName.Text);
cmd.Parameters.Add("@appname", TextBoxApplicationName.Text);
cmd.Parameters.Add("@Desc", TextBoxDescription.Text);
cmd.Parameters.Add("@comdate", TextBoxDate.Text);

try
{
con.Open();
adptr = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
adptr.Fill(ds);
dt = ds.Tables[0];
dv = new DataView(dt);
SearchResultGrid.DataSource = dv;
SearchResultGrid.DataBind();
con.Close()
}
catch(SqlException)
{
con.Close();
}
}
}

using this code i get the answer every time the user enter the data to search. but the last time the user searched data will be lost. i want that last time searching data including the present data.

regards,
Manikanta.
AnswerRe: Problem in displaying data. Pin
Wendelius2-Apr-11 2:22
mentorWendelius2-Apr-11 2:22 
Questionabout chating application Pin
avanishkri1-Apr-11 5:00
avanishkri1-Apr-11 5:00 
AnswerRe: about chating application Pin
Dave Calkins1-Apr-11 6:38
Dave Calkins1-Apr-11 6:38 
AnswerRe: about chating application Pin
Parwej Ahamad1-Apr-11 8:00
professionalParwej Ahamad1-Apr-11 8:00 
AnswerRe: about chating application Pin
RaviRanjanKr6-Apr-11 20:01
professionalRaviRanjanKr6-Apr-11 20:01 
QuestionRetrieve the value of a control of the master page Pin
amina891-Apr-11 0:44
amina891-Apr-11 0:44 
AnswerRe: Retrieve the value of a control of the master page Pin
Not Active1-Apr-11 1:05
mentorNot Active1-Apr-11 1:05 
GeneralRe: Retrieve the value of a control of the master page Pin
amina891-Apr-11 2:11
amina891-Apr-11 2:11 
GeneralRe: Retrieve the value of a control of the master page Pin
Not Active1-Apr-11 2:29
mentorNot Active1-Apr-11 2:29 
AnswerRe: Retrieve the value of a control of the master page Pin
gr33d1-Apr-11 4:53
gr33d1-Apr-11 4:53 
GeneralRe: Retrieve the value of a control of the master page Pin
amina894-Apr-11 12:08
amina894-Apr-11 12:08 
AnswerRe: Retrieve the value of a control of the master page Pin
Prasanta_Prince14-Apr-11 1:10
Prasanta_Prince14-Apr-11 1:10 
Questionproblem in displaying the data in datagrid` Pin
manikumar_gutti31-Mar-11 23:14
manikumar_gutti31-Mar-11 23:14 
AnswerRe: problem in displaying the data in datagrid` Pin
Deshpande.anagha1-Apr-11 0:43
Deshpande.anagha1-Apr-11 0:43 
AnswerRe: problem in displaying the data in datagrid` Pin
ktrrzn5-Apr-11 15:18
ktrrzn5-Apr-11 15:18 
QuestionCaptcha and Client IP Pin
Priya Prk31-Mar-11 22:57
Priya Prk31-Mar-11 22:57 
AnswerRe: Captcha and Client IP Pin
L Viljoen31-Mar-11 23:09
professionalL Viljoen31-Mar-11 23:09 

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.