|
In your Calculate button event try something like:
foreach (DataGridItem dgItem in myDataGrid.Items)
{
HtmlInputRadioButton rBuyButton = dgItem.FindControl("buyRadioButtonInGrid") as HtmlInputRadioButton;
if (rBuyButton.Checked)
{
}
else
{
}
}
|
|
|
|
|
Thanks a lot for the advise.
I’m using asp radio buttons, I modified the code accordingly. My problem with these radio buttons is, after selecting e.g “Buy” radio button and then click Calculate button, my radio button becomes unchecked and that leads to not getting the value of that radio button. What have I done wrong?
Calculate button code:
protected void btnCalculate_Click(object sender, EventArgs e)
{
foreach (GridViewRow dgItem in gridViewBill.Rows)
{
RadioButton rBuyButton = dgItem.FindControl("rdbBuy") as
RadioButton;
if (rBuyButton.Checked)
{
//Some Code for Buy
Label1.Text = rBuyButton.Text;
}
else
{
// Some code for Decline
}
}
}
This is my Gridview code:
<asp:GridView ID="gridViewBill" runat="server" HeaderStyle-Font-Bold="true" AllowPaging="True"
PageSize="3" Width="728px">
<HeaderStyle Font-Bold="true" />
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:RadioButton ID="rdbBuy" runat="server" Text="Buy" GroupName="options" />
<asp:RadioButton ID="rdbDecline" runat="server" Text="Decline" GroupName="options" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
It creates the table and loads the data from the database. How can I get each value of the “Price” column per row?
Thanks.
|
|
|
|
|
Hello Everyone
Myself Gaurav Gupta actually i would like to discuss that i want to upload the compiled code(by publish the website) which is made in asp.net2.0 to our web server .actually we have a domain www.xyz.com and i want to make a folder on root like icmm now i want to copy all the compiled code in that folder. but when run the application this message show."This is a marker file generated by the precompilation tool, and should not be deleted!"
Please tell me is it possible to upload the complete comiled code to upload in a folder or where i should upload bin folder.
Thanks
Gaurav Gupta
|
|
|
|
|
How did you complied and host your code ?
Do you have ASP.NET Framework installed on the Server where you have hosting your site ? If yes, does it registred with IIS ?
Below check the above two things that I have mentioned.
You may read this article :
Site pre-compilation in ASP.NET 2.0[^]
|
|
|
|
|
Hi Mr. Abhijit
Thanks for the reply.Actually i compiled by publish the website and host my compiled code on our webhosting company's server in a folder which is at the root of the website .
Yes all the setting is there on the server. I had a doubt that how to upload a code in subfolder. Like as the website is www.xyz.com/icmm_2010/abc.aspx.
I want all access all the pages in a folder(icmm_2010) which is on the root of the website.
Thanks
Gaurav
|
|
|
|
|
Is it possible to develop email piping on windows using asp.net or classic asp (C# or vb.net) and plesk, helm or any other control panel? If yes?How?
Thanks in advance.
|
|
|
|
|
Friends12 wrote: email piping on windows using asp.net or classic asp
What do you mean by that ?
|
|
|
|
|
How can I integrate asp.net and plesk?
|
|
|
|
|
hi all,
my problem is i stored data in viewstate when i click on another click event in same page view state is cleared....
i need create static viewstate,how?
how to solve this problem?
|
|
|
|
|
You can store your viewstate information in page cache or in session.
Because viewstate is reinitialized when page_load occurs.
Use
Page.Cache["name"]=value;
or
Session object to store your value.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
i have 100 records data... is it possible to store in session?
|
|
|
|
|
pramodgorityala wrote: i stored data in viewstate when i click on another click event in same page view state is cleared....
It is not like, viewstate is always there till the time you are on the same page. Might be somewhere you are clearing by yourself.Debug the code you might get the cause
|
|
|
|
|
hi all,
how to embeded gtalk in my application?
pls give me any urls and any ideas......
|
|
|
|
|
|
thanks for giving information..
i want to complete gtalk messenger in my webpage..
user can enter gmailid and passwords...
|
|
|
|
|
|
Use FileUpload control, upload file to a server location and save that path in DB.
|
|
|
|
|
hi there,
i want to handle Close event of my web browser.
if any one close the browser by using [X] button then i need to execute some code.
I can do it using Page_Unload event but for that i need to repeate same code on each page.
Can i catch the browser closing event in Gobal.ASAX...
so i define code only once ....?
Hope i clear what i want.......
Thanks in advance
koolprasad2003
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: t but for that i need to repeate same code on each page
If you are using master pages in your application, you wont have to write same code on each page.
On other thought, you can create a base page and write code to inject javascript function using ScriptManager. And then make all pages to inherit the base class.
|
|
|
|
|
There is no any permanent connection between your browser
and the server.
So you need to detect browser close event from client side (browser) and
then call server event to execute your code.
You can use master page to avoid writing repeating code on each page.
Find following code for the same.
1. To enable page methods
<asp:scriptmanager id="ScriptManager1" runat="server" enablepagemethods="true" />
2. Detect browser close event.
<body onunload="HandleClose()">
3. Call pagemethods to invoke server side event.
<script language="javascript" type="text/javascript">
function HandleClose()
{
alert("Killing the session on the server!!");
PageMethods.AbandonSession();
}
</script>
4. Define your page methods at server side and call your code.
[WebMethod]
public static void AbandonSession()
{
HttpContext.Current.Session.Abandon();
}
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
If you have a button or an imagebutton in the masterpage you can place the next code in you HandleClose() function:
__doPostBack('<%= Button.UniqueID %>','');
or
__doPostBack('<%= ImageButton.UniqueID %>','');
In that case you come in the OnClick event of the button or the imagebutton and there you can handle the Abandon of your Session
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
|
Hi,
How to call a ModalPopupExtender when clicked on a node of a treeview.
Thankyou,
YPKI
|
|
|
|
|
What is the problem you are facing to opein the modelpopupextender from the node.
You can open from javascript and from codebehind also.
to show from js, set the behaivorid of the extender and show this like
$find('behaviorId').show();
and from codebehind you can use this
ModalPopupExtender1.Show();
|
|
|
|
|
So I am looking at ASP.NET jobs at the moment and a few of them say they are a digital solutions company or digital agency. Does anyone know what they mean by this? I can't check out the companies cause they are all listed by a recruitment agency.
Also when people talk about commercial development experience, does that mean public facing stuff or just dev experience. I previously worked for a finance company developing inhouse software for our employees, I guess that doesn't count?
I have a good few more resume and ASP.NET job related questions, if this is the wrong forum I would be grateful if someone could point me to a better one.
Thanks in advance,
Colum
|
|
|
|