|
Oh yes, and instead of using the if statement try using a foreach loop maybe?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
The problem with the for each loop is it checks each row one at a time therefore not knowing if the next one is checked.
We are not a Code Charity
|
|
|
|
|
The problem I found with this was that my checkbox is a control in the gridview so I could only get it by specifying the following which had to go in the gridview loop
for (int x = 0; x < GridView.Rows.Count; x++)
{
GridViewRow row = GridView4.Rows[x];
bool isChecked = ((CheckBox)row.FindControl("chk")).Checked;
}
We are not a Code Charity
|
|
|
|
|
The logic for this is:
collection = SelectedItems
if collection.Count = 0 then collection = Items
foreach item in collection do ...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi All,
I am working with crystal reports, and want to display 3 records per page.
How to create formulas like @details, @reset in page header and details section.....
Please give me detailed steps......so that I can get rid of this problem.....
Thank you
Mcmilan
modified on Wednesday, June 25, 2008 5:06 AM
|
|
|
|
|
How to add custom properties in windows NTFS file system using .net
|
|
|
|
|
Sorry, please clarify what you are trying to do - whatever it is though, if it's to do with NTFS I suspect it's not an ASP.NET question.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
how to insert fckeditor value into database in correct format in asp.net.
|
|
|
|
|
What do you mean by 'correct format' ? Doesn't the editor provide you with that data ? You can store a blob if nothing else fits.
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 all
my case is
AutoCompleteExtender target the textbox control
and I make in GetCompletionList method my own code to retrieve from my database
it works in the page itself as defult.aspx
but when i make it in the usercontrol as kkk.ascx it not work
plz help me and give me the resion
thank in advice
Kareem Elhosseny
|
|
|
|
|
elhosseny wrote: but when i make it in the usercontrol as kkk.ascx it not work
Because TargetControlID will be changed. You need to set TargetControlID dynamically on page load event of the page.
Regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
thanks alot for your advice
Kareem Elhosseny
|
|
|
|
|
I have 4 radiobuttons like rb1,rb2,rb3,rb4 and 1 text box.
If I select rb4, text box should be enabled and focused. If I select other than rb4, text box should be disabled. I need this function for java script to avoid setting Autopostback is true. Pls help me for java script. Thanks in advance
Balasubramanian K.
|
|
|
|
|
you need to get the client side Id of the textbox, which you get with it's ClientID property. You need to write this to a variable in javascript, then write script which uses document.getElementById to access the textbox, then set it's disabled property
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,
mstxtRange is text box id
rb4 is radiobutton
I have added the following this on my page load
rb4.Attributes.Add("onClick", "EnableTxtBox();")
rb4.Attributes.Add("onBlur", "EnableTxtBox();")
Function EnableTxtBox()
{
if (document.form1.rb4.checked == true)
document.form1.getElementsById("mstxtRange").enabled = true
else
document.form1.getElementsById("mstxtRange").enabled = false
}
I have written the above js. It is not working well. What is the probm. with this
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: mstxtRange is text box id
Doubtful. Are you sure that's the id on the client side ?
Do you have firefox ? If you install firebug, you can debug your script by running it in FF.
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 )
|
|
|
|
|
Have you ever worked on javascript?
First of all javascript is case sensitive language so you can not define function as Function.
Are you using Radio Button list control if no then use RadioButtonList control and change your javascript as belove script
HTML Source code
[ this is an example. you can change it as per your requirement. here when I click on first radio button then textbox will be enable while on other radion button it will be disable ]
<asp:RadioButtonList ID="rblDate" runat="server" RepeatDirection="Horizontal" onclick="hideDateRange(this);">
<asp:ListItem Value="0">By date</asp:ListItem>
<asp:ListItem Value="1" Selected="True">Today</asp:ListItem>
<asp:ListItem Value="2">This week</asp:ListItem>
<asp:ListItem Value="3">This month</asp:ListItem>
<asp:ListItem Value="4">All</asp:ListItem>
</asp:RadioButtonList>
Javascript Code
function hideDateRange(obj)
{
if(document.getElementById('rblDate_0').checked)
document.getElementById('txtID').disabled=false;
else
document.getElementById('txtID').disabled=true;
}
Note : My radioButtonList control ID is rblDate and I want to enable textbox on firsl radio button check event so i have checked 'rblDate_0' id checked or not. You can set as per your requirement. and txtID is my textbox id.
regards
khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
hello
sir i have 2 table.
in one table name is client details and other is contact details.
i want to add data both these table.
but in second table i want to add two time recod.
i take one feild in table flag_O_R .
when i add first record ie add O means official contact details
and other is R means residential details.
pls tell me code.
Gayatri
|
|
|
|
|
what is imp ?
Do you really believe that you've given us enough info to write this code for you ? Or that it's appropriate to us ask to do your job without giving any evidence that you've at least tried ?
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 )
|
|
|
|
|
niki_nilu wrote: Subject: imp
niki_nilu wrote: i want to add data both these table.
What kind of data, and what operation do you mean exactly when you say that you want to add the data?
niki_nilu wrote: but in second table i want to add two time recod.
i take one feild in table flag_O_R .
when i add first record ie add O means official contact details
and other is R means residential details.
Do you want to filter the data in some way, or what do you mean? How does the flag affect the operation that you want to do?
niki_nilu wrote: pls
Please don't use txtspk (SMS style abbreviations) in forum postings. Especially as your english is a bit weak, you don't want to make it more confusing.
niki_nilu wrote: tell me code.
Right now there isn't really enough information to write any code. Perhaps if you make an attempt at writing some of the code, that might help in making it clearer what it is that you are trying to do.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
niki_nilu wrote: but in second table i want to add two time recod.
So for every 1 record in first table you want to add two in the second table?
Ive read your posts several times and Im not sure why you want this to happen?
please explain more
We are not a Code Charity
|
|
|
|
|
Hi,
i have an asp.net project that contains a subfolder (myproj/subfolder) with some classes and pages
i want to run what is in the subfolder in this fashion
http://localhost/subfolder/.... etc
can i do that ?
i tried to create a virtual directory in IIS that points to myproj/subfolder
but when i run the link
http://localhost/subfolder/Client/UserPermissions.aspx
i got the error
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'subfolder.Client.UserPermissions'.
Source Error:
Line 1: <%@ Page language="c#" Codebehind="UserPermissions.aspx.cs" AutoEventWireup="false" Inherits="subfolder.Client.UserPermissions" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3: <HTML>
Source File: C:\Inetpub\wwwroot\myproj\subfolder\Client\UserPermissions.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
|
|
|
|
|
If you left IIS alone, this would just work
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 )
|
|
|
|
|
Ayman Mashal wrote: can i do that ?
Sure, You Can !!
Ayman Mashal wrote: i got the error
Make Sure, you made the RootDirectory as Virtual Directory means
<br />
http:
if this is your path then Subfolder should be the virtual Directory
And Please Check The Asp.Net Version Of IIS -> Virtual Directory Property <br />
-> Asp.net Version.<br />
<br />
Make sure this is same with your Development version.
|
|
|
|
|
Ive found in the past that setting up my folder in sub directories and then using that in virtual directory causes problems, althought that might just be me
Or the code behind file may:
a. not be called that
b. might be in a different folder which may cause problems
hope this helps
We are not a Code Charity
|
|
|
|