|
Xavier Shay wrote:
I don't have a 'security' tab (Am I supposed to? I do on W2K) and I can't uncheck the readonly option
I'm in my W2K now but as I remember you have to go to
folder options--->View
Then I think one of the last options change the simple security to other ones,then you have 'security tab' in xp too.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
You're exactly right, thanks
- X
|
|
|
|
|
Yep, Mazdak is right, I'm replying just to say - I remember how I spent a whole day trying to find where the damn security tab is in XP, lmao. Nostalgy
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Xavier Shay wrote:
). But alas, I get a 'query must be updateable' error!
I went into the wwwroot folder using explorer and went to the databases folder's properties.
Have you set up your DB connection using ODBC? Putting your database in the wwwroot folder and hard coding the path is not a good idea. The reason I suspect you are getting this error is because you didn't set up connectivity with ODBC, and your database has a security level that is higher then the default IIS account so it won't allow read/write access. To change this either 1. Set up a ODBC connection(the right way) or 2. make your Access Database security level one that the default IIS account can use(the dangerous way).
|
|
|
|
|
I have to upload my site to a remote server which I don't have much control over, and as such I don't think I can use ODBC connection names (I don't know much about them, correct me if I'm wrong). I have the databases stored in a subdirectory (wwwroot/databases) and I am going to try and change the security permissions on this database. I'm not the right comp to try this now (it's at work) but I'll post what code I'm using as soon as possible.
Thanks for your help
- X
|
|
|
|
|
i want to destroy the application variables at anytime, can i do it and how?
|
|
|
|
|
Which application variables? What are you trying to do?
Ryan Johnston
|
|
|
|
|
For example, I create a application variable Application("message") to store inforamtion,so under some situation I want to destory this application variable, can I do it and how?
|
|
|
|
|
Heh. You mean you want to kill some annoying message box? Ya, it's possible in some cases.
Todd Smith
|
|
|
|
|
No, I did not mean that. For example, I create a application variable to store a array. I want to kill this variable to gain the allocated memory back. I want to do it at anytime, not controlled by Application_OnEnd.
|
|
|
|
|
Yes, sure you can.
You can use these method in ASP (3.0)
<%
' to remove all application variables in Application collection
Application.Contents.RemoveAll()
%>
or
<%
' to remove single application variable by name or index number
Application.Contents.Remove("name")
' if you know the index of it you can use
' to remove first item in application collection.
' index of application variable start from 1 not zero.
Application.Contents.Remove(1)
%>
Hope it help!
___________________________________________
lizhill
|
|
|
|
|
Thank you very much
That's what I want
|
|
|
|
|
I have a drop down list - code is:
APPMANAGER002
APPMANAGER004
APPMANAGER040
APPMANAGER078
APPMANAGER124
This list allows multiple selections. We all know that if I were to select both APPMANAGER002 & APPMANAGER078 from the list, that the results are passed as 002,078,etc.
What needs to happen is this: If I select APPMANAGER002 from the list, I need to send an email to this person with a notification. I need to duplicate this for each selection from the list. How can I look at the results and perform this? For instance, if this did NOT allow multiple selections, I could simply do a "IF APPMANAGER=002 THEN...". Since my results may be a string of selections, the IF statement above wouldn't work because the results may be APPMANAGER=002,078. Since I have NO idea what combination of results I will get, how can I look at the results, and based on what's in the string, perform IF THEN statements? Does this make sense?
Thanks for any help!
Robby
|
|
|
|
|
I'm just guessing from your "IF THEN" stuff that you are using VBscript and ASP?
Well I actually know nothing of either, but I have done plenty of this stuff in other languages.
I would break the string up into parts (do you have any kind of function that will allow you to just get part of a string?), and loop through testing each part.
Ryan Johnston
|
|
|
|
|
You can use this Vbscript/ASP code to parse the value of the dropdown and get each value between the commas seperatly
<br />
string1="test,test2" ' this is the string from the dropdown in it's original state<br />
divider="," 'this is the divider.<br />
<br />
string1=string1 & "," 'add the divider at the end to make sure you pick up the last value <br />
'in case the divider character is not already at the end.<br />
<br />
For counter1 = 1 To len(string1)<br />
if Mid(string1,counter1,1) <> divider Then<br />
counter2 = counter2 + 1<br />
Else<br />
tempstring = Mid(string1,counter1-counter2,counter2)<br />
if tempstring <> "" then<br />
'this is where you email code goes<br />
'tempstring is the value from between the comma<br />
MsgBox(tempstring) <br />
end if <br />
counter2 = 0<br />
End if<br />
Next <br />
<br />
Jared Solomon
Programmer/Analyst
|
|
|
|
|
you can do this is VBScript/ASP like this:
Hope it help!
dim strSelect, arrSelect
strSelect = Request.Form("APPMANAGER")
' check to see if user select multiple
if Cint(inStr(strSelect, ",")) > 0 then
' user selects more than one entry, put in an array collection
arrSelect = split(strSelect, ",")
for i = 0 to UBound(arrSelect)
' you put send mail here or call a function to send mail
doMail(arrSelect(i))
Response.Write arrSelect(i)
next
' now you can do whatever with it.
else ' strSelect has only one entry you can do it here.
' you can send mail here or call a function to send mail.
doMail(strSelect)
Response.Write "you select : " & strSelect
end if
sub doMail(managerID)
' do mail here
end sub
__________________________________________
lizhill
|
|
|
|
|
I'm designing a ASP.NET Server Control, that has a designer verb, so that when you click on it, you're presented with a window to edit the control's subobjects. One of the properties of the subobject is a dropdown of all the available controls on the page that owns the control. Thus far, the only way that I've been able to get the page object to the TypeConverter that populates the dropdown is to use a global shared variable to hold a reference to the page object (it's a hack, and I don't like it, but it DOES work). So that's my question. How can I get ahold of the page object from with in the TypeConverter?
Example of what I'm trying to do (yes, it's in VB.NET... you haven't gone blind ):
'HACK: Temporary fix for accessing the Page object
Friend Class PageData
Public Shared m_Page As Page
End Class
Public Class MyTypeConverter : Inherits TypeConverter
Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As ITypeDescriptorContext) As Boolean
Return True
End Function
Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As ITypeDescriptorContext) As Boolean
Return True
End Function
Public Overloads Overrides Function GetStandardValues(ByVal context As ITypeDescriptorContext) As StandardValuesCollection
Dim List As New ArrayList()
Dim C As WebControl
For Each C In PageData.m_Page.Controls
List.Add(C.ID)
Next
Return New StandardValuesCollection(List)
End Function
End Class
Public Class MyCustomControlSubObject
Protected m_BuddyControl As String
.
.
<TypeConverter(GetType(MyTypeConverter))> _
Public Property BuddyControl() As String
Get
Return m_BuddyControl
End Get
Set
m_BuddyControl = Value
End Set
End Property
End Class
Thanks in advance.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
I have a web page which displays a table with about 10 columns and hundreds of rows. The problem is that when the user scrolls down to see the lower rows, the first row (which contains the name of each column) scrolls away and the user has a hard time figuring out what each column represents.
The solution: to make the rows scrollable!
I broke the table up into two separate tables -- the top one containing just the row with the column titles and the bottom ones containing the actual data. I enclosed the bottom table inside a div with overflow-y:auto. This gives me the effect I need, but I had to make some adjustments:
1. Resize the div when the user resizes the browser window. No problem.
2. Resize the div when the number of rows is smaller than its height. No problem.
3. Make each column in the top table the same width as the corresponding column in the bottom table. Big problem!
My algorithm for resizing the columns is pretty simple (see below). First it makes the size of the top columns the same as the ones in the bottom table. Then, for any columns that remain out of synch, the bottom columns are resized to match the top columns. This works beautifully as long as the window is big enough. As soon as I start shrinking it too much, the columns can no longer be matched in width and the whole thing looks ugly.
Do you know of any JavaScript code I can use that can do this for me? I basically need an algorithm for keeping the column widths of two tables (with the same number of columns) consistent. This is only for IE; I don't care about Netscrape.
Thanks a bunch!
Alvaro
function matchColumnWidths(tableHeading, tableData)
{
if (!document.all)
return;
if (tableHeading.rows.length == 0 ||
tableData.rows.length == 0 ||
tableHeading.rows(0).cells.length != tableData.rows(0).cells.length)
return;
for (var i = 0; i < tableData.rows[0].cells.length - 1; i++)
{
tableHeading.rows[0].cells[i].width = "";
tableData.rows[0].cells[i].width = "";
}
for (var i = 0; i < tableData.rows[0].cells.length - 1; i++)
tableHeading.rows[0].cells[i].width = tableData.rows[0].cells[i].clientWidth -
(tableData.cellPadding * 2 - (tableData.cellPadding - tableHeading.cellPadding) * 2) +
(tableData.cellSpacing - tableHeading.cellSpacing);
for (var i = 0; i < tableData.rows[0].cells.length - 1; i++)
{
if (tableHeading.rows[0].cells[i].clientWidth != tableData.rows[0].cells[i].clientWidth)
{
tableData.rows[0].cells[i].width = tableHeading.rows[0].cells[i].clientWidth -
(tableHeading.cellPadding * 2 - (tableHeading.cellPadding - tableData.cellPadding) * 2) +
(tableHeading.cellSpacing - tableData.cellSpacing);
}
}
}
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|
|
Why don't you use an inline frame (<iframe> ) or a frameset for the data? That way the page won't scroll, just the data.
As far as column widths. Specify absolute pixel values instead of a percentage for everything - including the table itself. Or use CSS positioning to do the same thing.
Jeremy Falcon
Imputek
<nobr>"C# is the answer to a question nobody asked." - Chris Losinger
|
|
|
|
|
Jeremy,
I'm only having a problem with the column widths. I am using absolute pixel widths. But they don't always work as expected. For example, setting a particular column's width may cause other columns to be resized (by IE) unexpectedly.
Thanks anyway. If you (or anyone else) wishes to spend some of their time tackling this problem, I'd be happy to send a small HTML file that shows the problem.
Regards,
Alvaro
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|
|
I found a way to make it work!
The trick is to add the exact same row of the top table to the bottom table, but make it invisible. This is accomplished by setting the row's style to visibility:hidden; position:absolute.
Unf*ckingbelievable! After two days battling this problem I finally came up with a solution that works and looks great. I'm very happy!
Regards,
Alvaro
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|
|
In every sites that have login form,after you enter your name and PRESS ENTER,login operation happen.I want to know how can I catch enter pressed and do logining.I use ASP.NET.
Thanks
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
You can use Javascript to perform this function. Here is the sample code.
This javascript function recives the event object and uses the keyCode property to check for character '13' which is a carriage return.It submits the form and returns false so when the user clicks enter, the carriage return is not added to the field. If it is not 13 then allow the character to be typed in.
<br />
function CheckForEnter(oEvent)<br />
{<br />
if(oEvent.keyCode=='13')<br />
{<br />
return false;<br />
myform.submit();<br />
<br />
}<br />
else<br />
{<br />
return true;<br />
}<br />
<br />
<br />
}<br />
here is the HTML for a textfield, use the keyonpress event so that way the event fires before the character is actually entered.:
<br />
<form id=myform action=test.aspx runat=server><br />
<input type=text id=txtTest onkeypress="return CheckForEnter(event);"><br />
</form><br />
thats all there is to it.
Jared Solomon
Programmer/Analyst
|
|
|
|
|
Thank you.I have to check it.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Sir,
i had developed html page there is lot of content and some button also display in that page. On Html page one print button is there. when i print html on paper it aslo print "button" also on paper.
I don't want to print "button" on paper. i want to print only content on paper.
How should i do that
Regard raju
|
|
|
|