ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.search in website<p>Check what is coming from database when you press search button</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Fri, 17 Feb 2012 08:05:13 GMTsearch in website<p>my search button work correct&nbsp; it show correct result but when i want make new search at same page that still show my last search result&nbsp;</p> <p>I want when write my new word in my TB and click search button at first it clean my last search result from my page after that show new result of my new search.</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Fri, 17 Feb 2012 08:15:40 GMTsearch in website<p>Set AutoPostBack = true in the textbox and add textchanged event. Then in that event hide the GridView</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Fri, 17 Feb 2012 09:13:26 GMTsearch in website<p>I am not able to get what is the problem with old data? You can do only work at a time</p> <p>On button click why don't you simply bind the Grid with new data</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Fri, 17 Feb 2012 09:18:11 GMTsearch in website<p>i want when&nbsp; perform a new search my old data dont show in lable on my page i want just show my new data of my new search.</p> <p>&nbsp;</p> <p>Eg:at first i search book name it will show books name in my lable</p> <p>after that i search hotel name it dont clean the result of my last search it show book name and hotel name together.</p> <p>i dont want use gridview what can i do?</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Sat, 18 Feb 2012 04:23:58 GMTsearch in website<p>Can you paste the code where you set the label?</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Sat, 18 Feb 2012 05:43:43 GMTsearch in website<p>hi</p> <p>this is my code</p> <p>&nbsp;</p> <pre class="brush: csharp"> protected void Button1_Click(object sender, EventArgs e) { SqlConnection _cn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings[&#34;behtopConnectionString&#34;].ConnectionString); SqlCommand _cm2 = new SqlCommand(&#34;Trade&#34;, _cn); _cm2.CommandType = CommandType.StoredProcedure; _cm2.Parameters.Add(&#34;@Keyword&#34;, txtsearch.Text); if (_cn.State != System.Data.ConnectionState.Open) _cn.Open(); SqlDataReader _dr = _cm2.ExecuteReader(); while (_dr.Read()) { Label1.Text += &#34;&lt;div class=\&#34;ax\&#34;&gt;&lt;a href=\&#34;trades.aspx?id=&#34; + _dr[&#34;id&#34;].ToString() + &#34;\&#34;&gt;&lt;img class=\&#34;image\&#34; src=\&#34;./image.ashx?id=&#34; + _dr[&#34;id&#34;].ToString() + &#34;\&#34;&gt;&lt;br/&gt;&lt;br/&gt;&#34; + _dr[&#34;name&#34;].ToString() + &#34;&lt;/a&gt;&lt;br/&gt;&lt;/div&gt;&#34;; } if (_cn.State != System.Data.ConnectionState.Closed) _cn.Close();</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Mon, 20 Feb 2012 04:14:57 GMTsearch in website<p>In line no 15 add the following code</p> <p>&nbsp;</p> <pre class="brush: csharp">Label1.Text = &#34;&#34;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Mon, 20 Feb 2012 05:18:53 GMTsearch in website<p>thanks alot&nbsp; i did it</p>https://www.aspforums.net:443/Threads/169730/search-in-website/https://www.aspforums.net:443/Threads/169730/search-in-website/Mon, 20 Feb 2012 11:59:16 GMT