|
As above post you can have RadioButton List to add in the Page Dynamically
Now if you want to use ViewState of these radio buttons then you will have to add these buttons in page init event.
If you can't add these in Page init on account of any reasone then you will have to maintain state of these controls using State Management
Hope i didn't confuse you
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I was trying to pass a boolean type array in the Session object.
I create the array, assign the values then pass it.
When the other page loads - I fetch it using a boolean array.
But when I try to access this array on this new page, it gives me null reference error.
I tested with a single boolean variable as well - does the same thing.
Any ideas?
Thanks.
Ekjon
|
|
|
|
|
Yeah, your code is broken You can pass an array into the session, definately. What's the code look like ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian,
Here's what I'm trying:
On page 1
<br />
bool[] panels = new bool[size];
for (int i = 0; i < size; i++)
{<br />
panels[i] = true;<br />
}<br />
<br />
Session["Panels"] = panels;
Server.Transfer(....);<br />
Then on page 2
<br />
bool [] panels = (bool [])Session["Panels"];<br />
pnlAcct.Visible = panels[0];
I could pass them thru url as well, i know but there are 6 or more of them.
Thanks.
Ekjon
|
|
|
|
|
If you step through the first page, can you pull the array out of the session ? That's just odd.
What if you use List<bool> ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Arite..I'll try that, thanks.
|
|
|
|
|
Hi,
Hope you can help me
I have a tab container (ajax tool kit) with three
tabs
tab1 tab2 tab3
-
under tab3 I have a IFRAMME from which I call hyper.aspx where I have 3 hyperlinks
tab3
------
hyperlinke1
hyperlink2
hyperlink3
---------------
when I click hyper link1 under tab3 only
a different webpage should appear in the same tab3 container (panel)
there should not be pop up window effect. That is achieved.
tab3
------
label1 : textbox1
label2: textbox2
button
If i click on tab3 again again my hyperlinks (IFRAMME with hyper.aspx) should appear. I tried to put a javascript for OnClientClick event of tab but then webpage doesnt show my tab container.
Also I want to put a java script on textbox from tab1 where a javascript will check if the entered key is enter key (13) but it doent except the it.
how to achieve this?
regards
Vijay
My code of startup page is
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function GoToHyperLinks()
{
alert('hi');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />
<div>
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1" Height="322px">
<ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
<asp:CheckBox ID="CheckBox1" runat="server" />
<asp:RadioButton ID="RadioButton1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
<ContentTemplate>
<IFRAME SRC="default3.aspx" NAME="myframe" FRAMEBORDER=0 style="width: 285px; height: 285px">
</IFRAME>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer></div>
</form>
</body>
</html>
|
|
|
|
|
Hello there!
On my first page (called Home.aspx) I have a gridview that has a column that uses button for the user to click on and be directed to page 2 (called BookReviews.aspx). I do have it set up & working where the user clicks on a button in the gridview on Home.aspx and through a session variable it passes the bookID to display in a label on BookReviews.aspx. However, the problem is I would like ONLY the bookReviews for that given bookID to be displayed in a gridview on BookReviews.aspx. I am not sure how I should go about doing this. Thanks for your help in advance!
**Book Table**
bookID
bookName
**Book Reviews**
bookID
bookReviewID
bookReviewDescription
bookReviewUserName
.......and this is what I have on my second page so far....
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
}
labBookId.Text = Session["bookID"].ToString();
labBookReviewDesc.Text = Sessoin["bookReviewDescription"].ToString();
{
}
modified on Wednesday, April 23, 2008 4:38 PM
|
|
|
|
|
|
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
|
|
|
|