|
This is just a web application project on my own machine. I have done nothing special regarding state.
In this project, this behaviour started after I installed Win2000 SP3 earlier today. Before I installed it, the project still loaded slowly (about 20 seconds), but at least the page loaded. Now it just gives up after about 10 seconds. I suspect that this service pack set a value somewhere, but that's just a guess.
This behaviour only occurs if I start my app from inside Visual Studio. (Whether I start it for debugging or not.) If I start the page from the browser, it loads fine (although slowly).
|
|
|
|
|
MS le Roux wrote:
This is just a web application project on my own machine. I have done nothing special regarding state.
That is fine, however you need to understand that in web applications there is no state, you data and variables etc. only exist when they are on the server, they (e.g. - variables...) don't just wait for you at the server forever, it returns to the calling machine even if it is local.
Nick Parker
“Nothing is less productive than to make more efficient what should not be done at all.”
-Peter Drucker
|
|
|
|
|
But the problem is not with variables or data - it's that if I start my app from within Visual Studio .NET, it spontaneously shuts down if anything takes a bit too long when it's loading. Yet the page does load correctly if you load it directly from the browser.
|
|
|
|
|
Hi
I'm new to the Web side of .NET, but how does one create "expandable" dataitem such as those in the forum (dynamic view)?
Thanx in advance
|
|
|
|
|
leppie,
There are several ways to do this here is a script that will work.
<script language="javascript">
function tierMenu(objMenu,objImage)
{
if (objMenu.style.display == "none")
{
objMenu.style.display = "";
objImage.src = "/pics/expand.gif";
}
else
{
objMenu.style.display = "none";
objImage.src = "/pics/collapse.gif";
}
}
</script>
<div align="left" onclick="tierMenu(menu1, img1);">
<img src="/pics/book.gif" id="img1" style="{cursor:hand;}" WIDTH="16" HEIGHT="16">
<font SIZE="2" COLOR="#006666" style="{cursor:hand;}" onmouseover="color='#669999'" onmouseout="color='#006666'">
<b>Display Text To Be Clicked</b>
</font>
</div>
<br>
<span ID="menu1" STYLE="display: none">
<font size="2">
This is the information that will show once the display text is clicked
</font>
</span>
Nick Parker
|
|
|
|
|
Thanx Nick, will have a look into it.
Tell me, is C# server-side, exclusively or can u run it on the client?
|
|
|
|
|
Server side only, you can run Javascript through the client. At least Javascript it still has the ; at the end of a line.
Nick Parker
“Nothing is less productive than to make more efficient what should not be done at all.”
-Peter Drucker
|
|
|
|
|
This is probably a dumb question (ducks) but I just wrote my first application to actually use a .NET Web Service to retrieve content. It was really very easy to do and I like it alot... but .NET is actually going a step further than I really need it to. In my case, I actually WANT the raw XML response that's coming back from the web service. However, .NET is appropriately using the WDSL to package the response into a member of variable of the specified return type... which is really nice... if I needed that. Can anyone help me get at the XML response itself?
|
|
|
|
|
using System.Net;
WebRequest webrequest = System.Net.WebRequest.Create("url");
WebResponse webresponse = webrequest.GetResponse();
etc ....
|
|
|
|
|
I am building a web application with three user controls on the default page. From the page the user enters some data and clicks a button. The click of the button assigns a modular level variable the entered data, which is then used to populate the three user controls. If incorrect data has been entered I want to set the visibility of the user controls to be false from the click event on the default page. The user control gets added on the load of the default page with the following code.
ContentPane.Controls.Add(Page.LoadControl("~/Modules/ucCustomers.ascx"))
I tried the following code, but have run into errors. I’m not sure if it is moving in the correct direction or not.
Dim ucCustInfo As Control = FindControl("~/Modules/ucCustomers.ascx")
ucCustInfo.Visible = False Also have tried:
Dim c1 As Control = LoadControl("~/Modules/ucCustomers.ascx")
c1.Visible = True
I appreciate any help you can provide me. If you’re a C# programmer and can help feel free to do it in C# I will port it.
Jason W.
|
|
|
|
|
After getting seriously frustrated I discovered a way to accomplish what I want. It isn’t exactly what I was trying to do but the results are the same and that is all that matters.
Answer: Rather then setting the visibility of the user control itself, I can set the visibility of the place holder that the control has been added to.
Jason W.
|
|
|
|
|
Let´s assume that I have a page with lots of trace code, being tested by the IsEnabled property of the Trace context. Something Like this:
<br />
If Trace.IsEnable = True Then<br />
Trace.Warn("Warning ! Page meltdown !")<br />
Trace.Write("Call thy fireman !")<br />
End If<br />
<br />
'*** Some Code Here<br />
<br />
If Trace.IsEnable = True Then<br />
Trace.Warn("More tracing")<br />
Trace.Write("More Messages")<br />
End If<br />
When I enable the trace, it will be display in the page or in the page file.. blá.. blá.. blá.
My question is: If I Disable the Trace, is the "IsEnabled" test code and the Trace.Write/Warn code included in the compiled version of the page ? If it is, does it impact much on performance ? Does anyone benchmarked a page with trace code and trace disabled ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
I've gone sending to outer space, to find another race
|
|
|
|
|
"My question is: If I Disable the Trace, is the "IsEnabled" test code and the Trace.Write/Warn code included in the compiled version of the page ? If it is, does it impact much on performance ? Does anyone benchmarked a page with trace code and trace disabled ?"
The IsEnabled test and the Trace.Write code will be in compiled version of the page. But it won't affect performance that much. I only tested writing trace messages to a file, you can easily write over 20000 messages by multiple threads within a second.
|
|
|
|
|
Anonymously wrote:
by multiple threads within a second
How many ? I´m asking becuase my system have a extremly high access per second rate.
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
I've gone sending to outer space, to find another race
|
|
|
|
|
i have checkboxes which may return multiple results:
Decision Maker
Buyer&
Advisor
Also in my DB, there is a field for each with a yes/no value depending on if box is checked or not.
how do i enter the values into the fields in the DB as Request("Role") returns multiple values, each separated by a comma so the following (for example) cannot be used.
if Request("Role") = "Q4C2" Then
RS("Buyer") = True
end if
thank you!
|
|
|
|
|
Try something like this...
Dim MyArray
' pretend Role equals "1,0,1,0"
MyArray = Split(Request("Role"), ",")
For x = 0 To (UBound(MyArray)-1)
' update each record in recordset here
'
' i.e.; RS("Buyer") = CInt(MyArray(x))
' RS.MoveNext
'
' ...
Next
Jeremy Falcon
Imputek
<nobr>"In fact it is quite simple, men and women both only want one thing - what they can't have!" - phykell
|
|
|
|
|
in my database i have a yes/No checkbox. the asp code in relation to this is 2 radio buttons, the values for both are "yes" and "no". How do i code so teh checkbox in the database is checked if "yes" and left unchecked if "no"?
thank you!
|
|
|
|
|
Set their values to 1 for yes and 0 for no. In JScript use parseInt() to convert it to an integer and in VBScript use CInt() . Store the result in the database.
Jeremy Falcon
Imputek
<nobr>"In fact it is quite simple, men and women both only want one thing - what they can't have!" - phykell
|
|
|
|
|
mcm wrote:
How do i code so teh checkbox in the database is checked if "yes" and left unchecked if "no"?
Not sure if Jeremy answered your question as I think you are asking for how to do it the other way, right?
Basically when you pull the yes/no value from the database you do something like the following in your ASP page:
<input type="checkbox" name="chkYesNo" <%If rs("field") = "yes" Then%>checked="true"<%end if%> />
Inlining ASP is not a good idea, but that is one way to do it. You could also use JavaScript with the OnLoad event.
|
|
|
|
|
Uf.. I'm really tired from VS.NET, can't find anything there and my old projects are not working in .NET
I have several projects I did using InterDev from VS6. Firstly couldn't open them in .NET so re-created. Now it just not working well, I guess I need to figure out settings, but can't find anything yet.
When I navigate to some pages, the browser doesn't show them, but continue to download, looks like there is an error or something, although I'm sure there is no error, since same code is working well on my web site and worked with InterDev fine. If I'll cancel loading the page, I'm not able to use IIS until i'll restart it. Can someone tell me why this happen and how to fix this?
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
At least found now where the problem is. Maybe someone knows how to fix it?
I have such line in the ASP page:
set fso = Server.CreateObject("Scripting.FileSystemObject")
set dir = fso.GetFolder(strCurDir)
So exactly on this line IIS stops working. I got no error, nothing. Just IIS stops working at all. Parameter is correct, I gave even Full Access to Internet Guest Account, so security is not a problem... But what?
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
|
I have the following snippet of code, but I do not desire the horizontal scroll bars to be there...the text word wraps fine and doesn't need them...is there a way to hide H scroll bars...?
<div style="position: relative; width: 280px; height: 80px; overflow: scroll">
This is some text
</div
I think I have accomplished this before using a word wrap CSS attribute or something, but I cannot remember if it is available how I did this...?
Any ideas...? Thanks!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
I think I have accomplished this before using a word wrap CSS attribute or something, but I cannot remember if it is available how I did this...?
It is a bit odd but you need to set overflow to auto not scroll .
|
|
|
|
|
Thanks!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|