|
Garth wrote:
How would I add an ORDER BY statement to this?)
RS1.Open "SELECT * FROM Table WHERE Cat_ID =" & ActiveID & " ORDER BY Name", DB1, adopenstatic
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
this should get records updated only in the last seven days as well but I haven't checked this yet as I'm late for work
strSql = ""
strSql = strSql & "SELECT * FROM Table WHERE Cat_ID =" & ActiveID
strSql = strSql & " AND modifiedDate >= '"& DateAdd("d", now(), -7) &"' ORDER BY modifiedDate "
RS1.Open strSql, DB1, adopenstatic
HTH
|
|
|
|
|
I have a very simple ASP.NET application that just displays a form.
I can debug it through the IDE but if I try to browse it via IE, I get You are not authorized to view this page
This happens even if I attempt to browse from the IIS MMC or just straight http:\\localhost\WebApplication1
Any ideas, straight standard VS.NET installation on Windows XP.
Michael
|
|
|
|
|
Do you get that error if you browse to the page directly instead of letting the webserver pick the page for you?
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
I am just shooting here, but when you look at the properties of your wwwroot folder and click on the web sharing tab, you do have the share the folder radio clicked right?
Nick Parker
|
|
|
|
|
My default documents list didn't have the default.aspx page listed, so it couldn't load the start page. If i browsed to any other form directly it worked.
Doh! That's what you get with playing with new toys late at night.
Michael
|
|
|
|
|
Is it posssible to get a filename on the webserver, so that I pass a filename relative to a codebehind page and it gives me the filename relative to the page I am writing (using Response.Write).
For example, I have a code behind page called PageWriter.cs in /mhc/Scripts/CodeBehind. I want a function that will take a filename such as "../Index.xml" (indicating /mhc/Index.xml) and if I am writing the page /mhc/Index.html, give me the original filename relative to /mhc/Index.html, which would be simply "Index.xml". Am I making any sense? I want to give it the filename relative to the codebehind page, and get the filename relative to the page I am writing.
Thanks guys.
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
Come on people, this must be a fairly common thing? Or should I just use some horrible hack like analyzing the filename of the page I'm writing for how many "../"s should go in front of every filename I want to write on the page? That doesn't sound fun at all.
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
You can use Request.ServerVariables("SCRIPT_NAME"). That will return "/folder1/folder2/filename.aspx". Use LastIndexOf to find the last slash and extract the portion of the string that you need.
|
|
|
|
|
I was just wondering what everyone thinks about ViewState in ASP.NET. Yes - it saves a lot of coding, but it adds a lot of bulk to a page.
I just whipped up a quick form with a button, 2 drop lists (4 options each) and a text box. The viewstate was 5.6Kb. Ouch.
Will developers rely on viewstate, or will most disable able it and add the 3 lines of code each time to save download times for their users?
cheers,
Chris Maunder
|
|
|
|
|
I suppose the true answer is always that depends. As we see network throughput increasing rapidly, the issue of page size tends to decrease. As we all want to have our pages display as fast as possible, there is always an issue of design that comes into play. I recently (...past few months) have been working on an intranet application where the default page will load and "hide" 50 different div tags, within each of those I have 3 input boxes and a textarea box. Would I have appreciated the ViewState in this circumstance, YES, but is the overhead worth it, in this case probably not.
Nick Parker
|
|
|
|
|
ViewState seems really good for intranet apps where bandwidth isn't an issue, but for an internet app i think I would over ride the Save/Load Viewstate methods on my controls and use the session object instead to save the download time.
Of course I haven't actually practiced that principle yet, but it theory it should work well, once you get around what you would name everything
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
sir,
i have to read files kept on server.i have created handle for these files but am unable to read them .it just get stuck at getfolder method.do i need to have some permissions to access getfolder method.please advise me step by step.
thanx in advance.
kukum.
|
|
|
|
|
As I know you only need to have read access, but since it is on the web you already have it
Of course, if you are trying to get files/folders somewhere out of the web directory, you need this folder to have read permissions for "Everyone" or to be exact - "IUSR_..." (Internet Guest Account)
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Ok, I give, I'm experimenting with C#/asp.net and code behinds. What I'm trying to do is to have my asp.net page buttons open up a new browser and would like to send my PDF file to that window. I have no problems sending my content to my current window but not a new one.
I'm looking for a pure C# solution. (I have easily done this with jscript before).
Thanks,
Nick
|
|
|
|
|
Hi all,
I am a VC++ programmer and don't have experience in ASP. But now I am learning ASP.Net. These days I am trying to write a online Tetris game using ASP.Net technology.
At first I wanted to write a server control derived from System.Web.UI.WebControls.WebControl.Tetris game is encapsulated in this control and then can be put in any aspx page. However, I found in order to let the blocks move I have to depend on the server control to change the output html(I just use a html table to implement the interface of the game now)constantly. Then I realized that maybe using a server control is not a good idea in this problem. So now I think maybe I still need some client-side script to implement the moving of the blocks.
Since I don't know much ASP and just begin learning ASP.Net, I am not sure if I am on the right track to solve this kind of problem. Could anyone here give me any hints? And I want to know what is the best way to write a online game like Tetris by using ASP.Net technology?
Thanks a lot!
Sherry
|
|
|
|
|
Well, can't help you with ASP.Net, but for sure you don't need to use any server side scripting. All code should be a client side, and at this point you don't need to know ASP, only Javascript. You may use ASP for storing scores for example
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
when I select the value does not stay or highlighted
<title>Untitled Document
function onlyOneProvide(oForm, oFormEl, oFormElHidden)
{
var sTempValue
var sTempType
if (oFormEl.type == 'select-one')
{
sTempValue = oFormEl.selectedIndex
sTempType = 'select-one'
}
if (oFormEl.type == 'text')
{
sTempValue = oFormEl.value
sTempType = 'text'
}
oForm.reset()
if (sTempType == 'select-one')
{
oFormEl.selectedIndex = sTempValue
//alert('the sTempValue'+sTempValue)
oFormElHidden.value = findSelected(oFormEl)
}
if (sTempType == 'text')
{
oFormEl.value = sTempValue
oFormElHidden.value = sTempValue
}
}
function findSelected(oFormEl)
{
var sValue = ''
if (typeof(oFormEl) == "object")
{
sValue = oFormEl.options[oFormEl.selectedIndex].value
alert(sValue);
}
return(sValue)
}
select-one
TWIG (41451)
Stone Fox - A Dog Gone Good (41407)
Letters to the King (41405)
Finance Project (37166)
Voyages en français (41352)
Histoires amusantes (41255)
Cut a Label (41221)
Class China Website (41194)
Making Choices (41146)
Tweety Birds (41127)
Alberta-Oklahoma Music Connection (40499)
All About Me Student Portfolios (40498)
Zoom! The Fastest Vehichle WebQuest! (34306)
Monthly Muir Lake Thematic Couplet Riddles (35885)
Media and Society (41246)
|
|
|
|
|
Sir.
When i update the session variable with new value. It always give me old value.But when i refresh the browser then i get new value.
How will i get new Value of session variable immediatly without refreshing browser in ASP
|
|
|
|
|
The session values are updated whenever they are set, you probably have your setting code located below the displaying code which is why you don't see that.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
How would I stop text selection from occuring...?
I have created a div which can be dragged around the screen but would to prevent people from being able to select text...?
DHTML Central has little div's that act like Windows windows...you can drag them around but cannot select the caption text.
Any ideas...?
Ondragover
Ondragstop...?
Thanx~!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
onSelectStart=return false;
Example: try to select me
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Totally sweet...
Thats it...awesome...nothing fancy and super easy to add to my exiting projects...
However I would have to add this handler to all my elements that I don't want selected...?
I could do it globally with the folliwng:
document.OnSelectStart="return false;"
This would be doucment wide now correct...?
Thanx again!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Sir.
When i firstly set one value to session variable i can eaisly access that value from session variable. but when i reintialize it again new value to the same variable i get old value.When i refresh the Browser then i get new Value .
how i will get new value without refresh the browser from session variable.
|
|
|
|
|
I would think refresh is the only way to do it. cookies are cached on the client and would require another http request to update I think...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|