|
|
On your second page you could use the DetailsView control instead of the GridView control. The DetailsView is used for displaying the details of a single record.
I am not sure what you are using to store the info. But in general, you should be looking at the ObjectDataSource. Using the ObjectDataSource you can specify a method to DataBind your control (GridView or DetailsView). You can even specify parameters to pass to this method (such as another controls property - bookIdLabel.Text - or a Session variable, or (best of all in my opinion) a property on the Page).
In any case, have a look at the DetailsView Control and the ObjectDataSource. Look at tutorials about Master/Detail presentation with the GridView and the DetailsView controls.
|
|
|
|
|
No worries!!!!!!!!!!!
modify your dataset wrt the selected BookId, i.e, fetch the data where bookid =<selected bookid="">
Does that help?
Aditya
|
|
|
|
|
Can you elaborate a little more? Thanks
Also to elaborate more on my part, I am wanting to list multiple book reviews in a gridview not just a single review so I don't know if DetailsView would work.
|
|
|
|
|
I'm using a simple gridview with a sqldatasource. If I bind at design time, paging and sorting work fine. But, if I connect & bind at runtime, specifically during the page_LoadComplete event, I find that when I click the sort column link, that even though the e.sortexpression value (in the _Sorting event handler) does change when I click different columns, the e.sortdirection value does not when I click the same column link repeatedly (it always shows sordirection.ascending). I am prepared to handle the sorting & paging programmatically but would like to have a dependable e.sortdirection value that varies with the repeated column link clicking.
Any ideas??
|
|
|
|
|
maintain a global variable to retain the sort direction. then on sorting command - toggle the sort direction (ascending/descending)..
let me knw if this helped.
Aditya
|
|
|
|
|
Aditya,
thanks for the info. Actually, I had already done that in desparation. I was trying to figure out why this was needed though. It has something to do with my using programmatic binding of the sqlDatasource(late binding, if you will). If the sqlDatasource is bound to the gridview at design time, which doesn't suit my needs in other areas, the e.sortdirection toggles as it should. I'm new to Web development so I'm trying to understand the "why's"
thanks again,
BD
|
|
|
|
|
Hi All,
I am using an User Control, which have a Flash Movie. Since this website can be run in any machine, we need a Flash Player check using the example[^]. It works fine in the HTML. But it fail to work in the User Control.
The JS use document.write to render the Flash object. It executes the next lines of the JS block. This ensures that the object rendering done, but its not showing up. Is there anything I have to do with it?
|
|
|
|
|
The problem is solved. Thanks anyways.
|
|
|
|
|
How can i show progress bar while the processing of long task
|
|
|
|
|
Check this out
http://www.codeproject.com/KB/user-controls/progressbar.aspx
|
|
|
|
|
Hi,
i have 3 controls.. one button , other link button and Label
I have added the following script to Button1
function GetClick()
{
alert('hi this is alert');
__doPostBack('LinkButton1','');
}
Button1.Attribute.Add("onclick","GetClick();")
and i have link buttonclick event like the below
private void LinkButton1_Click(object sender, System.EventArgs e)
{
Label1.Text="Hi ....";
}
when i am running the application i could able to see the alert message
but LinkButton1_Click is not firing. label1 is not getting any message.
|
|
|
|
|
Use Button's OnClientClick property for assigning the javascript like,
Button.OnClientClick = "GetClick(); return false";
|
|
|
|
|
Hi, I am using asp.net 1.1,
|
|
|
|
|
The problem might be the postback of the Button Click event. Add the return false; along with your call.
|
|
|
|
|
HI, Thanks it is working...
|
|
|
|
|
Hi,
I have searched Google but I can not find an answer to my problem. I have a gridview. I don't have a datasource to connect to yet. I just need to display the gridview with a 5 columns (I have the column names) and maybe 10 rows. How do I do this? The first column (from the left) needs to contain a Hyperlink object. How do I code these rows programatically?
Thanks
Brendan
|
|
|
|
|
this might help you
http://www.dotnetcurry.com/ShowArticle.aspx?ID=107
|
|
|
|
|
In my application there is a grid now i want to bind it with multiple dataset it is possible?
jeny
|
|
|
|
|
Don't understand your question.
|
|
|
|
|
If your data sets table[0], are similar you can Merge tables and create a data table that contain all tables[0] and set this data table as the gride view data source.
else dont even think about it
|
|
|
|
|
|
I get this error whenever I place this code on my inline script.
this.RegisterClientScriptBlock("keyClientBlock", "alert ('Javascript block of code executed')");
Please advice.
thanks
Dom
|
|
|
|
|
I dont think you can use content place holder in a master page and in a normal page below that, try removing the content place holder from master page
|
|
|
|
|
Morning All,
Just have a quick question regarding automatic page refreshing.
I am creating a page that display status of some services on a machine. I want the page to refresh every 30 seconds let's say and I know that when I used .ASP I used the meta tag as displayed below:
""
So my question is, in ASP.NET is there an alternative method to automatically refreshing a page or will this suffice?
Thanks in advance for any opinions and options.
|
|
|
|