|
|
Btn_CloseWindow.OnClientClick = "window.close();";
this line is not executing when pressing button first time ? it working from second click please help me in this.
Regards
Rajkumar.
|
|
|
|
|
What is the error?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
use
Btn_CloseWindowAttribute.add("Onclick", "javascript:window.close();")
hope this help.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Can you please confirm where you wrote this code, on page load or click of the button itself?
*jaans
|
|
|
|
|
Hello all
In my application, i m generating checkbox dynamically. User can check multiple the checkbox. If user check more than three checkbox then i am showing a confirm box. Everyhting is running fine but the problem is that when user click on "Ok" ( on confirm box) at that time i am submitting the page by using following javascript code
function confApprove1()<br />
{<br />
resp =confirm ("You have checked more than 3 answers. You will be charged $250.00 for each additional answer. Do you wish to proceed?");<br />
<br />
document.Form1['JSApprResp1'].value = resp;<br />
var theform;<br />
if (resp=true){<br />
theform = document.forms["Form1"];<br />
theform.submit();<br />
}<br />
}
the page get reloaded then i am trying to find out how many check box user has checked and adding their information to database.
When i am trying to find out checked check box even though the check box is checked it shows .checked=false
and dose not go to inner loop?
how can i solve the problem.Am i doing something wrong. I have also tried to store all check box id in session and when i check value in session after user click on yes then is shown "Nothing" in session.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
|
hi
i have already checked that but this thread is not so useful for me.
any other suggestion.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
You can have a postback and with a unique hidden field value that you submit, you can try to distribute the control flow from page_load to where the control goes first on submit.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
It can be quite tricky involving javascript functions with code beinhd.
Javascript runs at client end so if you post back to the same page using c# you may encoutner problems eith whatever you told the jaavscript to do.
Check out some articles on storing variables and sending them
|
|
|
|
|
Ok i will try
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
currently i m using net 2005, 2.0 framework.
how to compare more than two date's in .net (web forms)? (both C#.NET,VB.NET)?
for example i have 4 date's
10/23/1987
7/11/2000
2/2/2008
2/1/2008
So, the resultant should be "2/2/2008" (among all the above date's this "2/2/2008" is largest)
how to achieve it? - KARAN
modified on Friday, May 2, 2008 5:52 AM
|
|
|
|
|
If you use .net 3.5 (VS 2008) you can use extension methods to easily do this:
Assuming dates is an array of DateTime objects:
DateTime maxDate = dates.Max< DateTime >();
|
|
|
|
|
currently i m using ASP.NET, with C# (.net 2005, 2.0 framework)
|
|
|
|
|
seeing as the OP actually stated that they were using the v2 framework, what's the point giving a solution using the 3.5 framework?
|
|
|
|
|
Sorry,I missed this point, or the OP added it as an edit.
|
|
|
|
|
hspc wrote: .net 3.5 (VS 2008)
The asker clearly mentioned his version requirement when an unsolicited post was done.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I would say the easiest way to do this is to put all your dates into an array and sort them. The default sort will order them oldest first and most recent last. here's some example code (writen in a console app for testing):
DateTime[] dts = new DateTime[4];
dts[0] = new DateTime(1987, 10, 23);
dts[1] = new DateTime(2000, 11, 7);
dts[2] = new DateTime(2008, 2, 2);
dts[3] = new DateTime(2008, 1, 2);
Console.WriteLine("Before Sort");
foreach (DateTime dt in dts)
Console.WriteLine(dt);
Array.Sort<datetime>(dts);
Console.WriteLine("After sort");
foreach (DateTime dt in dts)
Console.WriteLine(dt);
Console.WriteLine("Most recent date: {0}",dts[dts.Length - 1]);
Console.ReadLine();</datetime>
Now, if they happen to be an a List, the code is pretty similar. If you want to sort them a different way Array.Sort can take a second parameter which allows you to specify how the sorting takes place. Check the docs for more info.
|
|
|
|
|
|
Hai vasudevan deepak kumar..... this is only to compare two dates . i want to compare 3 or 4 or 5 dates?
|
|
|
|
|
I am working on an ASP.NET web application. It uses a dll file as reference. I updated and rebuilt the dll file. However I found the web application is still using the old dll. I removed the reference and add the reference in again. It won't solve the problem. I also uninstall the dll from GAC, and add the new dll into GAC. However, the web application is still using the old one. I am very sure about that. Because my commmented out method is still getting called. The dll is updated. I used the windows console application to call the dll. It is working. So the dll is updated.
I have been working on this issue for whole night and am so confused now.
How can I make the web application using the updated dll.
I am using VS 2008. The web site is not precompiled one.
Thank you so much for your consideration. Please help me out...
Best regards,
Bin
|
|
|
|
|
OK are you running this on a web server or local machine?
|
|
|
|
|
Can a iisreset help?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder
Why it is recommended?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
not sure why
But I tend to have my class files in the main folder next to my aspx files
Then any common method files I put in the app_code folder
|
|
|
|