|
ASP is a server technology. You can't refresh the users screen from the server. However, you perform a location.refresh() in javascript.
|
|
|
|
|
|
I have the need to insert a snippet of HTML into about 400 separate web pages. The first possibility is obviously to just open each file (different domains and accounts) paste the code and save (via MS FP).
Being the lazy person I am, I was hoping to someohow programmatically (ASP, VB etc) build something that can update those pages all at once (given the appropriate page name and login creds).
Any ideas?
TIA...
|
|
|
|
|
You want to write code that logs in to a remote web server, changes the HTML and then saves it ? No, that won't work. You'd need to FTP to the server to do that.
If your pages are XHTML, then an XSLT would be able to update all the pages for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually, I was planning on doing it via FTP and just wanted to find the best way/tool/method to programmatically update the file once I have it downloaded.
In other words, my program will grab the FTP address, login, download the file and then somehow modify it and put it back.
|
|
|
|
|
If you have write permission on the server, you could write an ASP.NET page that reads the files one by one, one line at a time, and writes them out to a temp file, inserting the required extra code along the way. Then rename the temp file as the original. Move on to next file. This kind of assumes the change is the same for all files, and there is some way of telling the script where to insert the new bits (eg, after the body tag)
This is not that hard to do. Examine the system.IO class for file functions, and the StreamReader and StreamWriter objects.
cheers
Phil
|
|
|
|
|
If it's XHTML, then an XSLT would be the best bet, IMO.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am working on ASP as front end and VB as middle layer, in an application. I need to use an array from VB in ASP. How to write the Let and Get properties for the same.
all help is appreciated. Thanks
|
|
|
|
|
I'm new to web sites and just learning so will someone with knowledge please help me figure out this?
I have 2 domain names. I have 1 hosting account. I have domain name #2 pointed to domain #1. for example: when putting www.domain1.com in the address bar it goes to domain #1. when typing domain #2 in the address bar it goes to domain #1/domain2
I was told that I can add more pages to domain #2 and put a mask code on the pages to make them work in domain #1 and the address bar will show the address domain #2.
I hope I'm expaining this correctly. I was told to go to google and do a search for datml masking code and I would find a code to put on the pages. I didn't find a code. Does anyone here know a code that will do that?
Thanks in advance,
Kozy Kitten
|
|
|
|
|
hi,
i have 2 list boxes on my aspx page. i need to have a functionality that,
whenever a user double clicks an item on any of the list boxes, it shifts to the other one. i am using a javascript for this purpose as there is no double click event provided.
the script is working and the items do shift. but when a server web control such as a button is clicked, all shiftings made by double clicking revert.
please help me. do i need to use viewstate? if i do, can anyone tell me how?
if there is another way please do tell me!
thanx in advance
☺«««DTA»»»☺
|
|
|
|
|
|
Pls suggest me any idea to write a program to convert from MS Access Database to MySQL Database.
Thanks and regard.
I tried so hard and got so far
|
|
|
|
|
I use Access to work with several MySql databases by linking tables through the ODBC.
First go to http://dev.mysql.com/downloads/connector/odbc/3.51.html[^] to download the ODBC driver for MySql. Create a DSN for the MySql database on your local computer. Open Access, go to File->Get External Data->Link Tables (be sure not to use import, because that will only work locally), and select ODBC in your file type drop down list. Under "Machine Data Sources", select the DSN you created. Select all the tables you wish to work with, and you will get icons for each under your tables list in your access window, except they look like globes instead of tables since they are linked tables.
Now that you have the tables set up in access, you can work with them however you want, including queries, forms, reports...whatever.
|
|
|
|
|
Hi Everyone,
I am very new to ASP.NET (student on work placement!) and I have created a form & table page which works no problem, the problem is when I try to split them up onto two pages.
I have a form page with loads of fields(around 50) a mix of ddl's, text fields, checkboxes etc. that the user fills in e.g. to list ingredients and prices for a new article. From this I have created a dataset to hold all the info. Then I also have another page that is a datagrid that lists a summary of the users articles using the dataset but only a few of the fields, when the user wants to edit a row in the table they will get redirected back to the form and all the articles information will be filled into the appropriate fields. So my question:
Do I have to create session state variables for every single field and then set them in the form page's page_load handler? or is there a easier way, something like creating an object of the table row like:
datasetIndex = e.Item.ItemIndex
activeRow = oDsArticle.NewArticle(datasetIndex)
and sending it in a session state and then somehow I can access all the fields through this object? I need all the help I can get!!!
Thanks in advance!
Sharon
|
|
|
|
|
Avoid session state, this is ASP.NET
The way to do this is to make both of these pages controls, then put them both on the one page, and make the navigation between pages hide and show them, so only one is visible. Then all your control variables will be available to you in your viewstate ( that is, you can just address the values in the controls on page 1 through properties, and pass them on to page 2 the same way )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian,
I have a page with both on it plus then I split them up onto 2 pages but how do I make them page controls?
and I know how to hide and show parts of a page when I am using panels(do I have to use panels?? I don't want to if its possible) but when I show one it is shown in the position it is on the page, how can I place it at the top of the page to make it look like a new page?
I don't really understand what you mean, could you maybe give a simple example?? I am trying a million different things and now I am totally confused.
Thanks,
Sharon
|
|
|
|
|
shazza2ee wrote:
I have a page with both on it plus then I split them up onto 2 pages but how do I make them page controls?
Simple - take the HTML and put it in a new ascx, by right clicking on a folder in your project and choosing 'add'->'new web user control'. Then put all your codebehind into the codebehind for the control. Finally, put a block like this at the top of your page:
<%@ Register tagprefix="myTag" Tagname="ControlName" Src="/PathToControl.ascx" %>
Then in your page you can put
<myTag:ControlName id="thename" runat="server" otherproperty="blah"/>
Now you can create an instance of hte control called thename in the codebehind and treat it like any other control. Any properties you define on the control can be set in the aspx as well as the codebehind.
shazza2ee wrote:
do I have to use panels??
No. What happens is that your two controls end up being all that's on the page, you just show one or the other. You can put stuff common to both pages into a seperate control and show it all the time if you want, or add normal HTML, but you don't have to.
shazza2ee wrote:
but when I show one it is shown in the position it is on the page, how can I place it at the top of the page to make it look like a new page?
It will show up where-ever you put the control. In this case, the control IS the entire page, so that's not a problem.
shazza2ee wrote:
I don't really understand what you mean, could you maybe give a simple example?? I am trying a million different things and now I am totally confused
Sorry if I've confused you. Here's an MSDN link ( with more links on the bottom ) on web user controls.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingwebusercontrols.asp
There are bound to be lots of examples on this site also. Just ask if you're still stuck.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
I am developing web service as well as a Winform client for transferring some data.
I just wand to know some of the exceptions during the transactions say for example
1. If web service as well as client is running in the same machine, if the IIS is not running means which exceptions will be thrown in the client side
2. If an error (say access violation) happened in the web service which exception will be thrown from the web service and how to catch in the client program
3.If the web service is running in the remote machine if the cline is unable to find the web service which exception will be thrown
4. If the web service is running in the remote machine and there is no network connection between the web service and the client , how it is possible to detect from the client side.
5.Each and every exception at run time is important for me for the cases like above.
Could any one provide some information or code sample regarding the same?
|
|
|
|
|
|
i'm looking for some style sheets css as there is only one or two types in dreamweaver software , help
thank in advance
|
|
|
|
|
Dear Sir/Madam,
I want to display a blinking cursor in a textbox when the webform is downloaded. I have tried to solve the problem by setting the tabindex property to 0.
Thanking you,
|
|
|
|
|
If it is always the same textbox you want to set the focus to, TextBox1 say, then it is easy: simply add a javascript text block to your page, after the closing </html> tag, along the lines of:
<script language="javascript">
document.forms(0).TextBox1.focus();
</script>
If you want to dynamically assign the box to receive the focus, you will need to construct the javascript command in your code and use the RegisterClientScriptBlock method, viz:
Private Sub setTheFocus(ByVal tb As String)
' tb is the name of the control you want to set the focu sto
Dim strScript As String
strScript = "<script language=javascript>document.forms(0)."
strScript += tb & ".focus();</" & "script>"
RegisterClientScriptBlock("anything", strScript)
End Sub
cheers
Phil
|
|
|
|
|
|
hello folks,
i am on a project using PHP and i need to retreive the currently logged-on windows user on a remote machine, how can i do this?
so all u code guru's out there could u pls help out.
thanx
there is always more than there is
socx d'buck
|
|
|
|
|
So....your running PHP on a windows box...and you need to determine who is logged in to the Windows machine?
Your not asking how to do PHP authentication?
Good question...
The PHP script when it runs might very well have the user which the script is running stored somewhere in the $_SERVER
Check that out...see if you can find anything on executing environment variables
_ENV["LOGNAME"] seems promising...
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|