|
|
Previous
< 1
2
3
4
5
6
7
8
9
> Next |
| ASP (INTERVIEW QUESTIONS) |
5 |
|
|
Response.expire = 0
The above statement cause the page to expire immediately |
|
|
|
Response.Write Response
Generates this error:
Response object error 'ASP 0185 : 80020003'
Missing Default Property
/.asp, line 0
A default property was not found for the object.
|
|
|
|
Generally we use Microsoft Visual InterDev 6.0 for developing ASP applications.We also use Macromedia Dreamweaver MX for ASP applications. |
|
|
|
Using pagination option in DataGrid control.
We have to set the number of records for a page, then it takes care of pagination by itself.
|
|
|
|
ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.
|
|
|
|
I created a simple table, with an Autonumber column and a text(50) column. I created a macro that would insert rows with random characters into the text columns. I set the repeat on the macro to 30,000 and ran it. While I was waiting for Access to struggle through the task and release my CPU so I could do other things on the box, I went and brushed my teeth. When I came back, it wasn't finished yet. So I read Tolkien's trilogy. When it finally completed the task, I observed the size of the MDB file, and it was around 1.3 MB. I then wrote a query to delete roughly half the records, interspersed. I closed the database, and lo and behold, the file was still 1.3 MB.
|
|
|
|
VBScript's arrays have quite a few limitations. You may have noticed if you try this:
x = 15
Dim demoArray(x)
You get this error:
Microsoft VBScript compilation (0x800A0402)
Expected integer constant
To work around this, you need to declare the array without a size (or with a constant size, e.g. 0), and then re-dimension it from the variable. Here are two examples; one using a simple array, the other a multi-dimensional array:
x = 15
Dim demoArray()
ReDim demoArray(x)
x = 15
y = 10
Dim demoArray()
ReDim demoArray(x,y)
|
|
|
|
VBScript does not support the OPTIONAL keyword, so you cannot set up a function to conditionally accept parameters. There are some kludges though, such as:
pass in a delimited string, with required parameters first, e.g.:
function test(foobar)
foos = split(foobar,",")
response.write foos(0)
if ubound(foos)>0 then response.write foos(1)
end function
test("1,2")
test("1")
pass in empty strings or other token values that tell the sub or function to ignore that value, e.g.:
function test(foo,bar)
response.write foo
if bar <> "" then response.write bar
end function
test("1","2")
test("1","")
|
|
|
|
Windows 2000 Professional and XP Professional all come with a limit of ten simultaneous connections. When there are more than ten active connections, you might see one of the following:
The page cannot be displayed
There are too many people accessing the Web site at this time.
These operating systems should be used for testing your ASP applications, not deploying them or hosting them in the real world. You will need to get a flavor of Server to do this. If you are developing locally and find that you are triggering this error even from the traffic of one or two users, disable HTTP Keep-alives for the site. These can maintain connection counts even for inactive users, but if you disable them, you will be much less likely to see adverse affects from local development. RIght-click the web site in Internet Services Manager, hit Properties, and on the Web Site tab, there is a checkbox labeled "HTTP Keep-Alives Enabled." Uncheck this box, hit Apply, OK, and exit Internet Services Manager.
|
|
|
|
Previous
< 1
2
3
4
5
6
7
8
9
> Next |
|
|