|
Well, have you tried the "Browse With" menu item when you right click on the project in solution explorer ? There you will find all the installed browsers, try making firefox as default. It's working correctly here.
|
|
|
|
|
I have a website, written in ASP .Net & C#, and I am using a Substitution to display the contents of an Excel spreadsheet. The page consists of a DetailsView with paging enabled; I need to coordinate the file shown in the substitution with the record currently displayed in the DetailsView. I have the filename stored in the same table as the contents of the DetailsView, but what I can't figure out is how to get that filename and display it in the Substitution.
Currently, I have it written as
<asp:Substitution runat="server" ID="Substitution1" Visible="False" MethodName="<%Response.WriteFile("C:\\Domains\\nautikakennels.com\\wwwroot\\pedigrees\\SterlingPedigree.htm"); %>" />
I was thinking about writing a SCRIPT tag in the page, but I'm not sure how to do that either...
Please HELP!
Thanks!
|
|
|
|
|
hi please help me
i am using onmouseover event in my aspx page.
i want to give two property in my single onmouseover event that is like below code:
onmouseover="this.className='opaque'; this.bgColor='<%=Session["BackColor"]%>';"
it is correct or not it is not working please help me..
with regards,
bretto
|
|
|
|
|
I guess your code is wrong. Create a separate JS function and give it there.
function doMouseOver(obj){
obj.className='opaque';
obj.bgColor='<%=Session["BackColor"]% >
}
onmouseover=doMouseOver(this) Hope it helps
|
|
|
|
|
Hi
I have a for loop which loops through a list of items in a gridview
For each item in the gridview i have an if statement which checks if a checkbox column in the gridview is checked, if it is then do something.
Now I have the following dilemma:
Say there is 5 items in the gridview a user can select 3 of them and not the other two and something will happen to just the ones that are selected
If they select all of them then something will happen
But currently if they select none nothing will happen
But I want to allow them to select none of the checkboxes for a change to be applied to all items in the gridview, however i dont know when to put this if statement to check if all are empty as I cant put it in the for loop as it would check one at a time.
any help would be great!
thanks!
Please ask for better exlanation if needed.
cheers
We are not a Code Charity
|
|
|
|
|
You want do something when no check boxes are checked, you want to do something when 3 check boxes are checked and you don't want to do anything if more than 3 of them are checked, Right ?
int itemsChecked = 0;
foreach(GridViewRow row gridView.Rows)
{
if(chk.Checked)
itemsChecked++;
}
If "itemsChecked" and gridview's row count is equal, then all items are checked. Is this what you need ?
|
|
|
|
|
N a v a n e e t h wrote: you don't want to do anything if more than 3 of them are checked, Right ?
no sorry
i would like the following
if all of the checkboxes are blank in the gridview to then update all items in the gridview,
Where would I check if all checkboxes are blank as I cant do this in the loop as it looks at each row one at a time therefore wont know if the next one is checked or not
thanks for the answer though
We are not a Code Charity
|
|
|
|
|
Have you tried using the if statement 1st. Say if the checkbox is checked then do the loop else if checkbox isn't checked then perform the other action?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
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.
|
|
|
|