 |
| SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 16th, 2004, 01:55 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
some improvement at this end -- I tried Vijay's suggestion to catch ZLS by setting parameter values = "" and it worked. Vijay & Imar, thank you for staying with me on this. Believe me, I have been at this since April -- the optional criteria issue -- but I have made critical progress since I joined this forum. Imar, you were absolutely right, there was an extra space in "Ballroom & Round Dance". It was "Ballroom & Round Dance" instead of "Ballroom & Round Dance".
The problem now is with the datagrid paging and I will tell you what I mean. when I click on the page number it tells me the "specified cast is not valid" and takes me to that line of page_load where I call mc as
"mc = (MusicCatalog)Context.Handler;" So the problem is on page reload. What do you think? Thanks again.
PS: On a different note -- It is a very tragic day for India. About 80 children were burnt alive in a school building fire near Madras in south India yesterday. As we grieve, let us remember and pray for those poor families.
|
|

July 16th, 2004, 02:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi shailesh,
I still think you're missing an important ASP.NET concept: that of PostBack. In ASP.NET, all pages post back to them selves. So, you have a page with a search text box and a Search button. As soon as you click that page, the btnSearch_Click event handles the search operation. It's not a good idea to Transfer control to another page; just keep everything in one page. If, for example, you want to hide the search box and button when you display search results, wrap that part of the form in a panel that you can hide.
The pseudo code for the page could look like this:
public void btnSearch_Click(object sender, System.EventArgs e)
{
string albumTitle = txtArtist.Text;
string albumLabel = txtLabel.Text;
// Code for Connections and DataSet stuff goes here
DataGrid1.DataSource = MyDateSet.Tables["MyTable"];
DataGrid1.DataBind();
// Hide the search panel (not necessary, just an example)
pnlSearch.Visible = false;
}
Most pages in the .NET world you'll see follow this pattern. PostBack is an important and useful concept in ASP.NET, and IMO, something worth using and investigating....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

July 16th, 2004, 02:47 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
THANK YOU VERY MUCH.
I went back to using querystrings and it is all working now. I am really relieved now. When I revise the site in the next six months, I will probably rely completely on postbacks after I have gained some level of expertise on it. Thanks very much Vijay, for that clue on ZLS.
Gratefully, Shailesh.
|
|

July 16th, 2004, 03:08 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You're welcome. I am glad it's working now.
And I just heard about the accident on the news. Very horrible indeed.....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

July 17th, 2004, 09:06 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
You are welcome Shailesh. Nice to hear that it works.
On the accident: Yes, it was the students' obedience that took their lives. It seems the teacher had asked them not to panic and stay silent where they are and they all did. Also the bigger door was not open for escape then and everyone has to escape through the narrow one, where stampede too was the cause for many lose their lives. Very horrible one.:(
Here in bangalore the local cable TV operators are on strike, so can't get much on anything happening around the world. The very sad thing is we are missing our heroes in action in the 6 nation Asia Cup cricket matches. The whole city is really silent for the past couple of days.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|
 |