This question has been around my head for the past months but I have been reticent to post it on here due to the subjective nature of the question, but here goes.
I'm a software engineering student and have been looking for quite some time to get serious about web development. I've done basic stuff in the past, mostly XHTML/CSS/Javascri...
I want to create and open a file but only if it doesnt exist. I dont want to use a File.Exists because a thread by switch after it creating a file with the same name.
How do i check if the exception System.IO.IOException was caused by the file existing? I prefer not to parse the error msg (even tho it can be as simple as .indexOf("exist...
Hi
I am trying to convert the contents of a grid View to an excel file
and I am doing it using this code
string attachment = "attachment; filename= " + FileName;
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/excel";
StringWriter sw = new StringWriter();
HtmlTex...
Hi guys
I have created the following project structure for my new asp.net mvc project any I was after some feedback as how other people are structuring their projects and if I would improve mine...
Here is what I have so far:
+Assets
-+Images
-+Scripts
-+Stylesheets
-+... 'More things like the above here
+Controllers
...
I have web page which is passing a querystring parameter to page 2:
<a href="Page2.aspx?WONumber=12345">
On page 2 I want to have an href which passes the same parameter value to page 3. I tried:
<a href="Page3.aspx?WONumber=" + request.querystring("WONumber") >
but that gives me a VS2008 error "attribute 'request.querystring' is ...
So I had an architect on a previous project who railed against Datasets. He hated them, and said they had no place in a web application, specifically a web app which will have a lot of traffic.
I've noticed in many instances of code I've taken over that Datasets are used quite heavily.
Are they really that bad/performance killing?
Sh...
I'm trying to create a custom control which will ultimately spit out a bunch of JavaScript. The JavaScript will use variables I create that have names specific to the instance of this control so that the Javascript is tied soley to this control as we may have many instances of this control on a page.
So I started creating a method whic...
I have two input text box, which are decimal.
The sum of this two input cannot more than 100.
When input1 enter 40, input2 cannot more than 60.
I need to do all the thing in client side and need to allow client to enter any value.
But if the entered value more than the limit, I need to show the validator error message and so Page.isVali...
hi guys,
I am using following code in rowdatabound fn.
Protected Sub gvwMileStone_RowDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.Footer Then
Dim ddlItem As DropDownList = CType(e.Row.FindControl("ddlFProjectLevels"),...
Hi guys,
I am looking into create a dynamic survey as posted in Get User Input From Dynamic Controls but with some different environment.
Below is what i am trying to do:
First when the user click the button, it will populate a dynamic table with radio button for the survey questionnaire inside a placeholder. However, I was unable to ...
Hi guys
This is my routing tables where do I put the various '.aspx' registrations?
//Turns off the unnecessary file exists check
this._Routes.RouteExistingFiles = true;
//Ignore text, html, xml files.
this._Routes.IgnoreRoute("{file}.txt");
this._Routes.IgnoreRoute("{file}.htm");
this._Routes.IgnoreRoute("{file}.html");
this._Routes....
I gave a site full trust however I am still getting some security exceptions.
How can I confirm a website has full trust?
...
I know how to create/implement friendly url in asp.net, but is it possible (and if so - how) to do it in classic asp?
if its impossible, how would google respond (SEO) to creating pages whos sole purpose is to redirect (on load) to a different page?
thanks!
...
I have written an HttpModule that accepts the request, processes it (via a database lookup), and outputs results (html) back to the response. (Note that the HttpModule actually ends the request after it is done, so there is no normal ASP.NET processing of the request.)
As the database lookup can be expensive/time-consuming, I would like...
I have a static timer class which will be called by ANY webpage to calculate how long each page has taken to be constructed.
My question is are Static classes thread safe? In my example will concurrent users cause a problem with my start and stop times? e.g a different threads overwriting my start and stop values.
public static clas...
I think it might have been asked before but i was unable to find the right answer, so i am asking here. i have added a data source which is working fine, i wanted a feature where i query the top n entries from the database and add it with a hyperlink. Think of it like Latest News! The markup for the hyperlink inside the ItemTemplate of D...
hi there,
i may be barking up the wrong tree here but i'm banging my head against a wall trying to write a regex rewrite.
i have two site that are identical but by choice the client uses one server (call it http://www1.test.com) to host part of the site to take load off the other.
i am using urlrewriting.net and so far have setup the ...
The ASP.NET Membershipsystem uses a unique username to identify a user. What if I need to login users by E-Mail?
I could just pass the E-Mail into the property for the username, but then things get a bit messy. The user might want to change the e-mailaddress.
Is there any resource available that decribes a good way to implement it?
...
I'm defining http handlers on my web.config:
<add name="nsi" path="i.nsi" verb="GET" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0" />
The scriptProcessor points to the Framework64 f...
I have a select query. I want to replace that select query with another select if that returns no rows.
For instance lets say I have:
Select * from Temp2
if (@@rowcount=0)
select * from Temp1
At the c# end, I retrieve it as a dataset. So if no rows are returned, it would do another select. But this select would be in Tables[1] not T...