|
OK. You dont have to do that way. This is not Windows Forms. So just create a Table or on the < td > where you have placed your Image. set your "Image" as the "BackGroundImage". and then put your other "ImageButtons" on that Table or < td >. You can do this by using Overlapping < div >s, But it will not be displayed correctly over different browsers. So just go with the first option.
Question 2 ??? Comming soon !!!
|
|
|
|
|
Hi all,
I have a XML files that looks like this:
...
<dataset>
...
<p x="-0.979248" y="-0.00141319" />
...
</dataset>
...
I need to find the highest value of y. The files have 100 000 rows so it should be reasonable fast. But any suggestions are welcome.
|
|
|
|
|
Hi,
first of all i wouldn't use an XML-class to load the dataset, this will be propably to slow. Try to use a stream to read the file line by line. There you could extract the y-value using a regular expression, or if all values have the same length (y is at the same index in every line) access it by its index. Then store the highest y-value somewhere and compare every y-value with this one. If the current y-value is higher overwrite the stored value.
This algorithm has a complexity of O(n). If you are using multiple processors you could think about splitting the file in two or more parts and use threads to accomplish the task.
Hope this helps you a bit.
Regards
Sebastian
|
|
|
|
|
Ah, OK. This was my first idea to solve the problem. But being an "old style" .net programmer I thought there was a more effective built in way to do it.
Stream and loop, simple enough...
<p x = "-0.975586" y = "0.000274252"/>
<p x = "-0.975342" y = "0.000164965"/>
<p x = "-0.97583" y = "0.000365295"/>
<p x = "-0.97583" y = "0.000365295"/>
<p x = "-0.974854" y = "-1.00148e-005"/>
I'll skip the regex and find the position fo "y = " and "/>" and grab the string between those positions.
|
|
|
|
|
Hi All,
I have a database driven web app written with C#, Asp.NET 2.0 and uses an SQL Server 2005 back-end. The app usually crashes at least once a day but some days does not crash at all and others it crashes much more often, its like it gets stuck in a loop of constantly crashing. An iisreset fixes the problem so is it safe to assume its iis that is the problem but i really need to find out what the cause of the crash is so im just looking for some advice as to where to start, are there some tools i can use or whats the best way to go about this. Any help or advice would really be appreciated
Regards
Tim
|
|
|
|
|
what error do you receive when your app crash???
maybe this be related to iis alive connections or etc... first post your error here
Human knowledge belongs to the world
|
|
|
|
|
Have you checked the event log on the server for some indication of what is causing the crash? Also check the IIS log files.
|
|
|
|
|
I have checked the Event Viewer and the most recent error is:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 13/01/2009 10:21:48
Event time (UTC): 13/01/2009 10:21:48
Event ID: a3413091a18d426ba586ccc714e6be15
Event sequence: 146
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/CD-1-128763154628476497
Trust level: Full
Application Virtual Path: /CD
Application Path: C:\inetpub\wwwroot\CD\
Machine name: MCORION
Process information:
Process ID: 10612
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: ArgumentException
Exception message: Column 'DistanceCovered' does not belong to table Table1.
Request information:
Request URL: http://mcorion/CD/Default.aspx?Page=AmiscoPhaseComparison
Request path: /CD/Default.aspx
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 10
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at blt.SS.View.ProzonePhaseAnalysis.FillPlayerMaxMinAverage(DataTable mainTable, DataTable dataTable, String statName)
at blt.SS.View.ProPhaseAnalysis.btnView_Click(Object sender, ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
The error seems to be that the Column 'DistanceCovered' does not belong to table Table1 but there doesnt seem to be any mention of this column in my code any where. Have not checked the IIS logs will find out how to and see what info that gives me.
Thanks for your reply
Tim
|
|
|
|
|
Must be in there somewhere, in the FillPlayerMaxMinAverage method.
|
|
|
|
|
as you think this seems that you have a problem on your code, trace your app and find the problem
Human knowledge belongs to the world
|
|
|
|
|
The problem is i have spent the last ten mins trying to get the same page to crash again and its running perfect now its doesnt make sense, the method mentioned FillPlayerMaxMinAverage does have statName as a param which may have been set to DistanceCovered but it just will not crash again, the page seems to be fine now so im just waiting for the next crash
I managed to find the IIS logs, they are very messy, is there some less complicated way to check them ???
|
|
|
|
|
Thanks for ur replies guys....
I managed to find that one "Distance Covered" bug buried deep in the code and got it sorted now but the app is still crashing regularly, i have noticed that the majority of the crashes are happening in the Data Access Layer objects when they try to interact with the db. This is the most common crash i am seeing in Event Viewer. But the prob is this method is run regularly and only crashes sometimes.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 13/01/2009 15:54:39
Event time (UTC): 13/01/2009 15:54:39
Event ID: 9334dc4729694b1a93e5e6d1c8789b75
Event sequence: 50
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/CD-1-128763355768712422
Trust level: Full
Application Virtual Path: /CD
Application Path: C:\inetpub\wwwroot\CD\
Machine name: MCORION
Process information:
Process ID: 8876
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
Request information:
Request URL: http://mcorion/CD/Default.aspx?Page=ViewTreatments
Request path: /CD/Default.aspx
User: MC\Medi
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 8
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at SportsAnalysis.DataAccessLayer.ObjectAccess.DatabaseSettings.SelectOne()
at blt.BasePage.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
Regards
Tim
|
|
|
|
|
I also have an application that I am supporting which becomes unstable / crashes. I was using the windows performance monitor and watching the .NET CLR Memory Total committed Bytes. The memory would just climb higher and higher and eventually the system would crash. I then looked into the Event viewer and we found error messages that lead us to the conclusion that there was a memory leak in one area of the application. The vendor fixed the leak and the system is more stable.
Start with monitoring the memory on the IIS server and check the memory usage, you may find a correlation between memory usage and system stability.
david
|
|
|
|
|
Hi everybody,
i want to display a popup window like msn. i have done for desktop application. but not for the web application. quick response 'll be highly appreciated.
Thanks in advance.
Regards,
Chanzeb Chaudahry
|
|
|
|
|
for popup window you need to use javascript function
window.open(aspx form);
umerumerumer
|
|
|
|
|
when trying to login from Logon page it is loging and going to master page and in the Master page different hyperlinks, when i click on any link it is redirected to Logon page.
<b>Login Page btnlogin click code</b>
if (DatabaseLayer.AdminDAO.UserExists(txtUserName.Text, txtPassword.Text))
{
FormsAuthentication.SetAuthCookie(txtUserName.Text, false);
Server.Transfer("~/Admin/Presentation Layer/MainPage.aspx");
}
else
{
Page page = HttpContext.Current.Handler as Page;
if (page != null)
{
page.ClientScript.RegisterStartupScript(page.GetType(), "msgbox", "alert('Sorry ! Your Login Failed');", true);
}
}
<b>Web.config Code</b>
<authentication mode="Forms">
<forms name="appNameAuth" path="./Admin/" loginurl="./Admin/Admin.aspx" protection="All" timeout="30">
</forms>
</authentication>
<authorization>
<deny users="?" >
<authorization>
<b>Main Page One Hyper Link</b>
<asp:hyperlink id="HyperLink15" runat="server" navigateurl="~/Admin/Presentation Layer/News.aspx" xmlns:asp="#unknown">News</asp:hyperlink><br />
While clicking any of the Hyper Links it is redirecting to Logon Page.
|
|
|
|
|
Hi,
I am following one MVC built in my organization but i am not happy with its performance.I need to change it.So please suggest me any mvc with good performance.
|
|
|
|
|
Hi,
what do you mean by MVC? Do you mean the model-view-controller architecture?
If you search a framework implementing/supporting the mvc-paradigma have a look a the ASP.NET MVC http://www.asp.net/mvc/[^].
Regards
Sebastian
|
|
|
|
|
Yes i here MVC is for model-view-controller
|
|
|
|
|
Ok. What is your issue? Is ASP.NET MVC not performing well for you?
|
|
|
|
|
Ya,MVC which one i m using is not performing well,so i need to change it
|
|
|
|
|
So you are using ASP.NET MVC? MVC is just a design pattern, there are lots of frameworks out there to help you using this pattern. You could also try to rewrite your application according to your needs using the MVC pattern.
|
|
|
|
|
Hellow all,
how to upload image in php code i know i am sending on wrong forum but kindly guide me i only trust on code project experts
Thanks in advance.
|
|
|
|
|
Code Project already has PHP forum. you can post this question in PHP Forum[^].
|
|
|
|
|
Hi friends ,
i need coding for login page that checks user name and password from database table. i search from google but i can t find satisfactory answer. plz send me coding if anyone knows
|
|
|
|