Thursday, March 29, 2012
Newbie: How do I create Dynamic instrument widgets in ASP.NET
I want to create a dynamic web page, which presents various instrument
widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
browser, with continous data updates from Server side data. Obviously
these instruments need to be constantly refreshed (every 0.5 second or
so) and not just on page load.
With Windows Forms, and GDI I can do this with networked Thick Client
code. I can also do dynamic web instruments with Java Applets, and I
guess DHTML/Javascript. But I really want to do the instruments in C#
and .NET. But I don't think that I can achieve this, because http and
ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
upon Server side controls, that won't refresh my instruments with live
data, once the page is downloaded. (Traditional DHTML/Javascript looks
like a real pain to develop instruments in.)
I am agreat fan of .NET technologies, but I was hoping for better MS
and .NET support for these instrument based web applications. But I
guess my only real choice is Java Applets !
Any suggestions on how I can achieve dynamic web instruments with .NET
technology would be appreciated.
Thanks
JulesThere may well be other ways of acheiving this kind of thing, but you could
just refresh the image (in JS) representing the clock
or you could use the WebBehaviour stuff, this will allow you to connect to a
webservice on the server (using JS again) then you can update your clock or
gauge or whatever in the JS on the client.
"Jules" <Roseanna80@.hotmail.com> wrote in message
news:80bc211e.0503310335.15a8c492@.posting.google.com...
> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
I'd say your requirements don't lend themselves to building a browser based
application. Consider building a traditional fat client app using ClickOnce
or NoTouch Deployment. A java applet is really no different.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
>
Newbie: How do I create Dynamic instrument widgets in ASP.NET
I want to create a dynamic web page, which presents various instrument
widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
browser, with continous data updates from Server side data. Obviously
these instruments need to be constantly refreshed (every 0.5 second or
so) and not just on page load.
With Windows Forms, and GDI I can do this with networked Thick Client
code. I can also do dynamic web instruments with Java Applets, and I
guess DHTML/Javascript. But I really want to do the instruments in C#
and .NET. But I don't think that I can achieve this, because http and
ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
upon Server side controls, that won't refresh my instruments with live
data, once the page is downloaded. (Traditional DHTML/Javascript looks
like a real pain to develop instruments in.)
I am agreat fan of .NET technologies, but I was hoping for better MS
and .NET support for these instrument based web applications. But I
guess my only real choice is Java Applets !
Any suggestions on how I can achieve dynamic web instruments with .NET
technology would be appreciated.
Thanks
JulesThere may well be other ways of acheiving this kind of thing, but you could
just refresh the image (in JS) representing the clock
or you could use the WebBehaviour stuff, this will allow you to connect to a
webservice on the server (using JS again) then you can update your clock or
gauge or whatever in the JS on the client.
"Jules" <Roseanna80@.hotmail.com> wrote in message
news:80bc211e.0503310335.15a8c492@.posting.google.c om...
> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
I'd say your requirements don't lend themselves to building a browser based
application. Consider building a traditional fat client app using ClickOnce
or NoTouch Deployment. A java applet is really no different.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
Newbie: How to display search results?
I have a web page (page1) where I allow the user to make a search, text box
plus a botton (botton1).
When he click the botton (button1), the server obtain (from memory) an array
of Products Id.
I want to open a second web page (page 2) with the results (obtained from a
database using the Products Id), the results will be shown in a datagrid.
My question:
- If Once I clicked botton1 I retrieve from de database the Products (using
the array of ProductsId and a datareader) how I bound this datareader to the
datagrid in page2?.
- I think there is a second option: I pass the array (memory array) of
products Id to Page2 (how i do it?) and the Onload event of Page2 read the
data from the database and show it in the datagrid. How I pass the memory
array to Onload event of Page2?.
I am pretty new to ASP.NET so I suspect there is an standard way of doing
this, I welcome any suggestion.
Thanks,
JaimeI am new to ASP.NET, so probably my question is very basic:
Quote:
Originally Posted by
>
I have a web page (page1) where I allow the user to make a search, text box
plus a botton (botton1).
When he click the botton (button1), the server obtain (from memory) an array
of Products Id.
I want to open a second web page (page 2) with the results (obtained from a
database using the Products Id), the results will be shown in a datagrid.
>
By "open a second page", do you mean "open in a new window", or just
"replace the current page"? If new window, then see if there is a
"target" attribute on that button (button1). If current page, then
nothing special needs to be done.
Quote:
Originally Posted by
My question:
- If Once I clicked botton1 I retrieve from de database the Products (using
the array of ProductsId and a datareader) how I bound this datareader to the
datagrid in page2?.
- I think there is a second option: I pass the array (memory array) of
products Id to Page2 (how i do it?) and the Onload event of Page2 read the
data from the database and show it in the datagrid. How I pass the memory
array to Onload event of Page2?.
>
I am pretty new to ASP.NET so I suspect there is an standard way of doing
this, I welcome any suggestion.
>
Thanks,
>
Jaime
To switch from one page to another, you can use "Response.Redirect()",
using the new url as a parameter.
To pass data from one page to another, there are several options:
- querystring, like "page2.aspx?searchtext=bla". Best for a small list
of short values, that can be represented by a string.
- Session data. In page1 you store "it" in the session
(Session["productids"] = list) and in page2 you read it, casting as
required ( int[] list = (int[])Session["productids"] )
You can perform the search in page1, passing the results (via Session)
to page2. Or you can pass the searchtext to page2 (session or
querystring), where the complete search is performed. I like the second
option better, as you concentrate the "search functionality" in that
page.
Hans Kesting
Newbie: how to navigate from one to another asp in the project
I have two asp-pages in my project.
There is a task on the first one, when the solution of the task ok, then
should the second page come. I made a menu for this. If the task solution
ok, then becomes the menu visible. Is it possible to activate automatically
the menu if the task solution ok? I mean, without the click on it? It it
possible to do all this simplier? I think somethink like this:
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click
If MySolution=true then
MySecondASPpage should be shown (what to entere here??)
end if
end sub
Thanks
BarbaraYou may want to use Response.Redirect("PageNameHere")
- V
Barbara Schmidt wrote:
Quote:
Originally Posted by
Hallo everybody!
I have two asp-pages in my project.
There is a task on the first one, when the solution of the task ok, then
should the second page come. I made a menu for this. If the task solution
ok, then becomes the menu visible. Is it possible to activate automatically
the menu if the task solution ok? I mean, without the click on it? It it
possible to do all this simplier? I think somethink like this:
>
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click
>
If MySolution=true then
>
MySecondASPpage should be shown (what to entere here??)
>
end if
>
end sub
>
>
>
Thanks
>
Barbara
Newbie: How to start
I have a html page with a form. How can I start turning this into an asp.net
page to including validation and submit processing?
Thanks
Regards
YahyaHey,
Well first things first. Create a web project if you are using Visual
Studio. If not .. you will need to work a bit more and create a virtual
directory and an aspx page. Similar to a normal html page but with lot of
extra tags... Get yourself a good asp.net book.
Now copy the html body and paste it in the aspx file. When you double a html
object like button or image it will be converted to equivalent web control
Have fun learning.. its fun..
Hermit Dave
"John" <john@.nospam.infovis.co.uk> wrote in message
news:%23neTBVQvDHA.2464@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a html page with a form. How can I start turning this into an
asp.net
> page to including validation and submit processing?
> Thanks
> Regards
>
> Yahya
Newbie: I need some tips
OS: XP pro sp2
I need to create a asp.net page which will receive data sent to it via
GET... The data sent into the page is a number, this number should be added
together with the numbers sent into the page by other users...
for example:
user A: http://localhost/test.aspx?value=1
and
user B: http://localhost/test.aspx?value=2
if user C want to retrieve this value, he should get the value 3 (1 +2)
Here som of the code in my Global.asax.cs:
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
///
int b;
protected void Application_Start(Object sender, EventArgs e)
{
b ++;
Application.Add("test", b);
}
As you can see from my code above, I'm trying to fix this problem using
HttpApplication... Is that the correct approach? If it isn't, what is the
correct approach then??
JeffUsing Application is fine...but you should be putting it in the
Application_BeginRequest method, or the Page_Load of test.
Application_Start fires once and only once so it'll never add. It's hard to
advise without knowing more in detail. I'd be tempted to scoping this out
to the test.aspx page.
The following code will in no way compile, but should give you a general
idea
page_load
int userInput;
try{
userInput = Int32.Parse(Request.QueryString["value"]);
}catch (Exception ex){
if (!(ex is FormatException) && !(ex is InvalidCastException) && !(ex
is OverflowException))
throw;
}
object o = Application["totalCount"]
if (Application["totalCount"] != null){
((int)Application["totalCount"]) += userInput
}else{
Application["totalCount"] = userInput;
}
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:%23KAabkfWFHA.3716@.TK2MSFTNGP12.phx.gbl...
> IDE vs .NET 2003
> OS: XP pro sp2
> I need to create a asp.net page which will receive data sent to it via
> GET... The data sent into the page is a number, this number should be
> added
> together with the numbers sent into the page by other users...
> for example:
> user A: http://localhost/test.aspx?value=1
> and
> user B: http://localhost/test.aspx?value=2
> if user C want to retrieve this value, he should get the value 3 (1 +2)
> Here som of the code in my Global.asax.cs:
> public class Global : System.Web.HttpApplication
> {
> /// <summary>
> /// Required designer variable.
> /// </summary>
> ///
> int b;
> protected void Application_Start(Object sender, EventArgs e)
> {
> b ++;
> Application.Add("test", b);
> }
> As you can see from my code above, I'm trying to fix this problem using
> HttpApplication... Is that the correct approach? If it isn't, what is the
> correct approach then??
> Jeff
Newbie: I need some tips
OS: XP pro sp2
I need to create a asp.net page which will receive data sent to it via
GET... The data sent into the page is a number, this number should be added
together with the numbers sent into the page by other users...
for example:
user A: http://localhost/test.aspx?value=1
and
user B: http://localhost/test.aspx?value=2
if user C want to retrieve this value, he should get the value 3 (1 +2)
Here som of the code in my Global.asax.cs:
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
///
int b;
protected void Application_Start(Object sender, EventArgs e)
{
b ++;
Application.Add("test", b);
}
As you can see from my code above, I'm trying to fix this problem using
HttpApplication... Is that the correct approach? If it isn't, what is the
correct approach then'
JeffUsing Application is fine...but you should be putting it in the
Application_BeginRequest method, or the Page_Load of test.
Application_Start fires once and only once so it'll never add. It's hard to
advise without knowing more in detail. I'd be tempted to scoping this out
to the test.aspx page.
The following code will in no way compile, but should give you a general
idea
page_load
int userInput;
try{
userInput = Int32.Parse(Request.QueryString["value"]);
}catch (Exception ex){
if (!(ex is FormatException) && !(ex is InvalidCastException) && !(ex
is OverflowException))
throw;
}
object o = Application["totalCount"]
if (Application["totalCount"] != null){
((int)Application["totalCount"]) += userInput
}else{
Application["totalCount"] = userInput;
}
Karl
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:%23KAabkfWFHA.3716@.TK2MSFTNGP12.phx.gbl...
> IDE vs .NET 2003
> OS: XP pro sp2
> I need to create a asp.net page which will receive data sent to it via
> GET... The data sent into the page is a number, this number should be
> added
> together with the numbers sent into the page by other users...
> for example:
> user A: http://localhost/test.aspx?value=1
> and
> user B: http://localhost/test.aspx?value=2
> if user C want to retrieve this value, he should get the value 3 (1 +2)
> Here som of the code in my Global.asax.cs:
> public class Global : System.Web.HttpApplication
> {
> /// <summary>
> /// Required designer variable.
> /// </summary>
> ///
> int b;
> protected void Application_Start(Object sender, EventArgs e)
> {
> b ++;
> Application.Add("test", b);
> }
> As you can see from my code above, I'm trying to fix this problem using
> HttpApplication... Is that the correct approach? If it isn't, what is the
> correct approach then'
> Jeff
>
>
Newbie: Javascript help
user enters a given character (say "?") into a textbox server control please?
Thank youIn the .aspx page (did not check it running):
<head>
...
function checkKey(){
if (window.event.keyCode==63)
myForm.submit();
else
return true;
}
...
</head>
<body>
<form id=myForm ...?>
...
<asp:textbox ... onkeypress="return checkKey();" ... />
...
</form></body
Eliyahu
"MikeH" <MikeH@.community.nospam> wrote in message
news:BE91A000-8D92-448E-9B03-CC531DF85F8D@.microsoft.com...
> What js code is required to automatically submit a page to the server when
a
> user enters a given character (say "?") into a textbox server control
please?
> Thank you
Newbie: Issue with postback
This code doesn't appear to work (it always states that the page is not a postback:
<%@dotnet.itags.org.Page Language="VB"%>
<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
If Page.IsPostBack Then
Response.write("postback")
Else
Response.write("start")
End If
End Sub
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
<html>
<head>
<title>Testing Postback</title>
</head
<body
<form action="postback.aspx">
<input type="submit" name="sub" value="go"/>
</form
</body>
</html
Also, isn't the source of the page supposed to show the encrypted viewstate hidden field. On my page this is not present.
I would be grateful for any tips on where I'm going wrong.
MHitting F5 or refresh DOES NOT cause a postback. If you click a button on the page, THEN you will get a postback.
Monday, March 26, 2012
newbie: Master pages... dynamic content...
I'm porting a windows app to the web - My main page is very simple and
will look something like this:
----
| Title |
----
| | button navigation bar |
| | ---|
| | |
| Menu| |
| | Content |
| | |
| | |
| | |
---
Menu is a treeview control that is (potientially) different for each
user that visits the site. (nodes are dynamically populated in the
treeview via code behind based on user's role and auth. level)
The Content can be any object renderable by a browser (HTM, flash, pdf,
office document, etc).
The question is can i display different web forms in the content part
when the menu is clicked?
I've looked at master pages but from what I understand they would only
be able to display HTM in the "Content" area. Does anyone have any
ideas on how to allow the content area to display other types of
objects?
Can anyone help a web rookie ?You have some incorrect notions.
Master pages can have dynamic content. The isue is they are a little harder
to ahve the page update master page content, but it is not impossible. And,
if you have the master page render dynamically, there is no issue. I see no
reason why a user driven menu cannot be placed in a master page.
If you use master pages, the different content is fairly easy. If not, you
will need another option. DotNet Nuke is an option and would be easier than
rolling your own.
Third choice, way out in left field, is to create your own engine to render
the pages. I would inherit from page to do this, as you can have your class
handle most of the lifting. User controls are also an option for content, if
you wish to use a model-view-controller type of set up. I would shy away
from any of these choices, esp. as a rookie, unless the master pages and
DotNet Nuke fail to work.
NOTE: Check out the starter kits under downloads at www.asp.net. They will
give you a good framework to start from.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
****************************************
****
Think outside the box!
****************************************
****
"celoftis" <celoftis@.gmail.com> wrote in message
news:1168276140.365434.16250@.42g2000cwt.googlegroups.com...
> Using VS2005, VB codebehind,
> I'm porting a windows app to the web - My main page is very simple and
> will look something like this:
> ----
> | Title |
> ----
> | | button navigation bar |
> | | ---|
> | | |
> | Menu| |
> | | Content |
> | | |
> | | |
> | | |
> ---
> Menu is a treeview control that is (potientially) different for each
> user that visits the site. (nodes are dynamically populated in the
> treeview via code behind based on user's role and auth. level)
> The Content can be any object renderable by a browser (HTM, flash, pdf,
> office document, etc).
> The question is can i display different web forms in the content part
> when the menu is clicked?
> I've looked at master pages but from what I understand they would only
> be able to display HTM in the "Content" area. Does anyone have any
> ideas on how to allow the content area to display other types of
> objects?
> Can anyone help a web rookie ?
>
I have a treeview in a master page, and I display pdf files(EKGs and X-Rays)
in the content pages using an <embed> tag. The 'src' attribute of the embed
tag is assigned when the content page loads based on the query string used
to open the content page when a treeview node is clicked.
"celoftis" <celoftis@.gmail.com> wrote in message
news:1168276140.365434.16250@.42g2000cwt.googlegroups.com...
> Using VS2005, VB codebehind,
> I'm porting a windows app to the web - My main page is very simple and
> will look something like this:
> ----
> | Title |
> ----
> | | button navigation bar |
> | | ---|
> | | |
> | Menu| |
> | | Content |
> | | |
> | | |
> | | |
> ---
> Menu is a treeview control that is (potientially) different for each
> user that visits the site. (nodes are dynamically populated in the
> treeview via code behind based on user's role and auth. level)
> The Content can be any object renderable by a browser (HTM, flash, pdf,
> office document, etc).
> The question is can i display different web forms in the content part
> when the menu is clicked?
> I've looked at master pages but from what I understand they would only
> be able to display HTM in the "Content" area. Does anyone have any
> ideas on how to allow the content area to display other types of
> objects?
> Can anyone help a web rookie ?
>
Gregory,
Thanks for the reply. I'm excited at the possibility of making this
work.
I've got hundreds (if not a thousand) content pages that I need to be
target for the "child page". Problem is I don't want to modify all
the pages - in fact, the majority of the pages are on remote servers
that I have no access to - so I really just need to be able to point
to a URL and have it load in the child page. Can I still use master
pages to make this work?
I've reviewed ASP.NET downloads haven't found anything that suits my
situation - any other pointer or code snippets would be greatly
appreciated! Please Let me know what you think either way.
celoftis
Thanks... I'll keep that in mind.
The content inside a 'child page' needs to be inside a ContentPlaceHolderID
control. Also - the page needs to have the .aspx extension and have a
reference at the top of that content page, to the master page.
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"celoftis" <celoftis@.gmail.com> wrote in message
news:1168447380.383686.248680@.i56g2000hsf.googlegroups.com...
> Gregory,
> Thanks for the reply. I'm excited at the possibility of making this
> work.
> I've got hundreds (if not a thousand) content pages that I need to be
> target for the "child page". Problem is I don't want to modify all
> the pages - in fact, the majority of the pages are on remote servers
> that I have no access to - so I really just need to be able to point
> to a URL and have it load in the child page. Can I still use master
> pages to make this work?
> I've reviewed ASP.NET downloads haven't found anything that suits my
> situation - any other pointer or code snippets would be greatly
> appreciated! Please Let me know what you think either way.
> celoftis
>
David,
Thanks for the reply...
So, for my specifc situation (not being able to access all the content
pages), it looks like master pages are not going to work - do you
agree?
But if I could modify the content of all the child pages, then I could
use a script to wrap the existing page(s) with
ContentPlaceHolderID(s)... seems real messy.
newbie: Master pages... dynamic content...
I'm porting a windows app to the web - My main page is very simple and
will look something like this:
----------------
| Title |
----------------
| | button navigation bar |
| | ------------|
| | |
| Menu| |
| | Content |
| | |
| | |
| | |
---------------
Menu is a treeview control that is (potientially) different for each
user that visits the site. (nodes are dynamically populated in the
treeview via code behind based on user's role and auth. level)
The Content can be any object renderable by a browser (HTM, flash, pdf,
office document, etc).
The question is can i display different web forms in the content part
when the menu is clicked?
I've looked at master pages but from what I understand they would only
be able to display HTM in the "Content" area. Does anyone have any
ideas on how to allow the content area to display other types of
objects?
Can anyone help a web rookie ?You have some incorrect notions.
Master pages can have dynamic content. The isue is they are a little harder
to ahve the page update master page content, but it is not impossible. And,
if you have the master page render dynamically, there is no issue. I see no
reason why a user driven menu cannot be placed in a master page.
If you use master pages, the different content is fairly easy. If not, you
will need another option. DotNet Nuke is an option and would be easier than
rolling your own.
Third choice, way out in left field, is to create your own engine to render
the pages. I would inherit from page to do this, as you can have your class
handle most of the lifting. User controls are also an option for content, if
you wish to use a model-view-controller type of set up. I would shy away
from any of these choices, esp. as a rookie, unless the master pages and
DotNet Nuke fail to work.
NOTE: Check out the starter kits under downloads at www.asp.net. They will
give you a good framework to start from.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
********************************************
Think outside the box!
********************************************
"celoftis" <celoftis@.gmail.comwrote in message
news:1168276140.365434.16250@.42g2000cwt.googlegrou ps.com...
Quote:
Originally Posted by
Using VS2005, VB codebehind,
I'm porting a windows app to the web - My main page is very simple and
will look something like this:
----------------
| Title |
----------------
| | button navigation bar |
| | ------------|
| | |
| Menu| |
| | Content |
| | |
| | |
| | |
---------------
>
Menu is a treeview control that is (potientially) different for each
user that visits the site. (nodes are dynamically populated in the
treeview via code behind based on user's role and auth. level)
>
The Content can be any object renderable by a browser (HTM, flash, pdf,
office document, etc).
>
The question is can i display different web forms in the content part
when the menu is clicked?
>
I've looked at master pages but from what I understand they would only
be able to display HTM in the "Content" area. Does anyone have any
ideas on how to allow the content area to display other types of
objects?
Can anyone help a web rookie ?
>
I have a treeview in a master page, and I display pdf files(EKGs and X-Rays)
in the content pages using an <embedtag. The 'src' attribute of the embed
tag is assigned when the content page loads based on the query string used
to open the content page when a treeview node is clicked.
"celoftis" <celoftis@.gmail.comwrote in message
news:1168276140.365434.16250@.42g2000cwt.googlegrou ps.com...
Quote:
Originally Posted by
Using VS2005, VB codebehind,
I'm porting a windows app to the web - My main page is very simple and
will look something like this:
----------------
| Title |
----------------
| | button navigation bar |
| | ------------|
| | |
| Menu| |
| | Content |
| | |
| | |
| | |
---------------
>
Menu is a treeview control that is (potientially) different for each
user that visits the site. (nodes are dynamically populated in the
treeview via code behind based on user's role and auth. level)
>
The Content can be any object renderable by a browser (HTM, flash, pdf,
office document, etc).
>
The question is can i display different web forms in the content part
when the menu is clicked?
>
I've looked at master pages but from what I understand they would only
be able to display HTM in the "Content" area. Does anyone have any
ideas on how to allow the content area to display other types of
objects?
Can anyone help a web rookie ?
>
Gregory,
Thanks for the reply. I'm excited at the possibility of making this
work.
I've got hundreds (if not a thousand) content pages that I need to be
target for the "child page". Problem is I don't want to modify all
the pages - in fact, the majority of the pages are on remote servers
that I have no access to - so I really just need to be able to point
to a URL and have it load in the child page. Can I still use master
pages to make this work?
I've reviewed ASP.NET downloads haven't found anything that suits my
situation - any other pointer or code snippets would be greatly
appreciated! Please Let me know what you think either way.
celoftis
Thanks... I'll keep that in mind.
The content inside a 'child page' needs to be inside a ContentPlaceHolderID
control. Also - the page needs to have the .aspx extension and have a
reference at the top of that content page, to the master page.
--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"celoftis" <celoftis@.gmail.comwrote in message
news:1168447380.383686.248680@.i56g2000hsf.googlegr oups.com...
Quote:
Originally Posted by
Gregory,
Thanks for the reply. I'm excited at the possibility of making this
work.
I've got hundreds (if not a thousand) content pages that I need to be
target for the "child page". Problem is I don't want to modify all
the pages - in fact, the majority of the pages are on remote servers
that I have no access to - so I really just need to be able to point
to a URL and have it load in the child page. Can I still use master
pages to make this work?
>
I've reviewed ASP.NET downloads haven't found anything that suits my
situation - any other pointer or code snippets would be greatly
appreciated! Please Let me know what you think either way.
>
celoftis
>
David,
Thanks for the reply...
So, for my specifc situation (not being able to access all the content
pages), it looks like master pages are not going to work - do you
agree?
But if I could modify the content of all the child pages, then I could
use a script to wrap the existing page(s) with
ContentPlaceHolderID(s)... seems real messy.
newbie: MapPath from non page class
the headaches for me. But alas (and alack) it's only available in the Page
class. What I wanted to do was write a separate class (code only, no GUI)
for handling data and be able to find the data files using MapPath from
within this class. Is there a way to use the MapPath functionality from non
page derivatives? Or can I use some kind of static function to return a ref
to Server object?
Or do I have to use the app start page to prime some global variable with
the datafile path?I'm not sure if I know exactly what you want but here is a shot. You
want to use the mappath function in a class behind the scenes. The
easiest way to do this is
You will need to reference System.Web.
Then add the following code.
System.Web.HttpContext.Current.Server.MapPath(@."..\..\FolderName")
For a non-page class check out httpcontext.current, e.g.
httpcontext.current.server.mappath()
Bill
"KMA" wrote:
> Ah yes. The MapPath function and the "~" . They're really taken out some o
f
> the headaches for me. But alas (and alack) it's only available in the Page
> class. What I wanted to do was write a separate class (code only, no GUI)
> for handling data and be able to find the data files using MapPath from
> within this class. Is there a way to use the MapPath functionality from no
n
> page derivatives? Or can I use some kind of static function to return a re
f
> to Server object?
> Or do I have to use the app start page to prime some global variable with
> the datafile path?
>
>
Yep. That's exactly what I wanted. Now that I've seen it I'm kicking myself
that I never saw it for myself. Still, I did mark the post "Newbie".
Cheers again.
"jmferguson" <jmferguson@.gmail.com> wrote in message
news:1108741296.751381.21490@.l41g2000cwc.googlegroups.com...
> I'm not sure if I know exactly what you want but here is a shot. You
> want to use the mappath function in a class behind the scenes. The
> easiest way to do this is
> You will need to reference System.Web.
> Then add the following code.
> System.Web.HttpContext.Current.Server.MapPath(@."..\..\FolderName")
>
newbie: MapPath from non page class
the headaches for me. But alas (and alack) it's only available in the Page
class. What I wanted to do was write a separate class (code only, no GUI)
for handling data and be able to find the data files using MapPath from
within this class. Is there a way to use the MapPath functionality from non
page derivatives? Or can I use some kind of static function to return a ref
to Server object?
Or do I have to use the app start page to prime some global variable with
the datafile path?I'm not sure if I know exactly what you want but here is a shot. You
want to use the mappath function in a class behind the scenes. The
easiest way to do this is
You will need to reference System.Web.
Then add the following code.
System.Web.HttpContext.Current.Server.MapPath(@."..\..\FolderName")
For a non-page class check out httpcontext.current, e.g.
httpcontext.current.server.mappath()
Bill
"KMA" wrote:
> Ah yes. The MapPath function and the "~" . They're really taken out some of
> the headaches for me. But alas (and alack) it's only available in the Page
> class. What I wanted to do was write a separate class (code only, no GUI)
> for handling data and be able to find the data files using MapPath from
> within this class. Is there a way to use the MapPath functionality from non
> page derivatives? Or can I use some kind of static function to return a ref
> to Server object?
> Or do I have to use the app start page to prime some global variable with
> the datafile path?
>
Yep. That's exactly what I wanted. Now that I've seen it I'm kicking myself
that I never saw it for myself. Still, I did mark the post "Newbie".
Cheers again.
"jmferguson" <jmferguson@.gmail.com> wrote in message
news:1108741296.751381.21490@.l41g2000cwc.googlegro ups.com...
> I'm not sure if I know exactly what you want but here is a shot. You
> want to use the mappath function in a class behind the scenes. The
> easiest way to do this is
> You will need to reference System.Web.
> Then add the following code.
> System.Web.HttpContext.Current.Server.MapPath(@."..\..\FolderName")
newbie: menu / sitemap problem
asp.net 2.0
My webportal consist of 2 menus (a header menu which goes horizontally
across the top of the page. And a sidebar menu to the left. The menuitmes
shown in the sidebar menu is dependent on what menuitem is selected in the
main menu.)
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description="" >
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>
When the "Network" menuitem in my main menu is clicked the sidebar menu
displays these menu items "Search", "ItemA", "ItemB". So now if the user
clicks on the "Search" menuitem in the sidebar menu, the sidebar menu
continue to display the same menuitems ("Search", "ItemA", "ItemB").
Problem:
In the "Search.aspx" file there is a button (btnSearch), which when clicked
executes this code:
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Redirect("~/Result.aspx?name=" + txtFullname.Text);
}
So when the result.aspx page is displayed. the sidebar menu is empty. I
think this must be related to using "Response.Redirect" to open the
"result.aspx" page. When the "result.aspx" page is opened. I want the
sidebar menu to continue to display the same menuitems ("Search", "ItemA",
"ItemB") as it did in the "search.aspx" page.
Any suggestions?
JeffI don't think that your problem has anything to do with the redirect.
You could try separating the
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
into a separate sitemap file and creating a new SitemapProvider that the
side menu would bind to (you can specify the sitemap file in the sitempa
definintion)
or
(and I haven't tried this myself)
The sitemap schema allows you to specify a provider or sitemap file on a
sitempa node. So what you might be able to do is:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="~/Result.aspx" title="Result" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>
Note that when the XMLSitemapProvider tries to find a node it search the
node list by url, including the querystring. This could cause you problems,
you may need to strore the name query string parameter in session.
Hope this helps,
Garth
"Jeff" wrote:
Quote:
Originally Posted by
Hey
>
asp.net 2.0
>
My webportal consist of 2 menus (a header menu which goes horizontally
across the top of the page. And a sidebar menu to the left. The menuitmes
shown in the sidebar menu is dependent on what menuitem is selected in the
main menu.)
>
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description="" >
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>
>
When the "Network" menuitem in my main menu is clicked the sidebar menu
displays these menu items "Search", "ItemA", "ItemB". So now if the user
clicks on the "Search" menuitem in the sidebar menu, the sidebar menu
continue to display the same menuitems ("Search", "ItemA", "ItemB").
>
Problem:
In the "Search.aspx" file there is a button (btnSearch), which when clicked
executes this code:
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Redirect("~/Result.aspx?name=" + txtFullname.Text);
}
>
So when the result.aspx page is displayed. the sidebar menu is empty. I
think this must be related to using "Response.Redirect" to open the
"result.aspx" page. When the "result.aspx" page is opened. I want the
sidebar menu to continue to display the same menuitems ("Search", "ItemA",
"ItemB") as it did in the "search.aspx" page.
>
Any suggestions?
>
Jeff
>
>
>
Thanks for replying so soon to my thread!
I don't quite understand (rememeber I'm a newbie) how this could solve my
problem. I mean I don't understand how putting the sidebar menuitems in it's
own sitemap file / provider could fix it... It works today with 1 sitemap
file and 1 provider. The problem is with the result.aspx page which is not
accessible through the menu. (currently not added to the sitemap, but could
add it if that is recommended)
Maybe I should have added that I based the configuration of my menus on
article: http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx which shows
how to combine 2 menus, one menu dependent on the other menu.
When the user clicks on the "Network" menuitem in the main menu, the sidebar
menu displays "Search", "ItemA", "ItemB" menuitems. It continue to display
these menuitems when the user clicks on the "Search" menuitem in the sidebar
menu. It's only when the result.aspx file is displayed that the sidebar menu
shows no menuitems...
Any thoughts?
Jeff
"GarthS" <GarthS@.discussions.microsoft.comwrote in message
news:AF1F5849-1230-4B46-B58F-49547A835A99@.microsoft.com...
Quote:
Originally Posted by
>I don't think that your problem has anything to do with the redirect.
>
You could try separating the
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
>
into a separate sitemap file and creating a new SitemapProvider that the
side menu would bind to (you can specify the sitemap file in the sitempa
definintion)
>
or
(and I haven't tried this myself)
The sitemap schema allows you to specify a provider or sitemap file on a
sitempa node. So what you might be able to do is:
>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="~/Result.aspx" title="Result" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>
>
Note that when the XMLSitemapProvider tries to find a node it search the
node list by url, including the querystring. This could cause you
problems,
you may need to strore the name query string parameter in session.
>
Hope this helps,
>
Garth
>
"Jeff" wrote:
>
Quote:
Originally Posted by
>Hey
>>
>asp.net 2.0
>>
>My webportal consist of 2 menus (a header menu which goes horizontally
>across the top of the page. And a sidebar menu to the left. The menuitmes
>shown in the sidebar menu is dependent on what menuitem is selected in
>the
>main menu.)
>>
><?xml version="1.0" encoding="utf-8" ?>
><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
> <siteMapNode url="Default.aspx" title="Home" description="">
> <siteMapNode url="~/Network.aspx" title="Network" description=""
Quote:
Originally Posted by
> >
> <siteMapNode url="~/Search.aspx" title="Search" description=""
>/>
> <siteMapNode url="~/pageA.aspx" title="ItemA" description=""
>/>
> <siteMapNode url="~/pageB.aspx" title="ItemB" description=""
>/>
> </siteMapNode>
> <siteMapNode url="" title="Forum" description="" />
> </siteMapNode>
></siteMap>
>>
>When the "Network" menuitem in my main menu is clicked the sidebar menu
>displays these menu items "Search", "ItemA", "ItemB". So now if the user
>clicks on the "Search" menuitem in the sidebar menu, the sidebar menu
>continue to display the same menuitems ("Search", "ItemA", "ItemB").
>>
>Problem:
>In the "Search.aspx" file there is a button (btnSearch), which when
>clicked
>executes this code:
>protected void btnSearch_Click(object sender, EventArgs e)
>{
> Response.Redirect("~/Result.aspx?name=" + txtFullname.Text);
>}
>>
>So when the result.aspx page is displayed. the sidebar menu is empty. I
>think this must be related to using "Response.Redirect" to open the
>"result.aspx" page. When the "result.aspx" page is opened. I want the
>sidebar menu to continue to display the same menuitems ("Search",
>"ItemA",
>"ItemB") as it did in the "search.aspx" page.
>>
>Any suggestions?
>>
>Jeff
>>
>>
>>
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:OEdOwrEsGHA.5072@.TK2MSFTNGP05.phx.gbl...
Quote:
Originally Posted by
Thanks for replying so soon to my thread!
>
I don't quite understand (rememeber I'm a newbie) how this could solve my
problem. I mean I don't understand how putting the sidebar menuitems in
it's own sitemap file / provider could fix it... It works today with 1
sitemap file and 1 provider. The problem is with the result.aspx page
which is not accessible through the menu. (currently not added to the
sitemap, but could add it if that is recommended)
>
Maybe I should have added that I based the configuration of my menus on
article: http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx which
shows how to combine 2 menus, one menu dependent on the other menu.
>
When the user clicks on the "Network" menuitem in the main menu, the
sidebar menu displays "Search", "ItemA", "ItemB" menuitems. It continue to
display these menuitems when the user clicks on the "Search" menuitem in
the sidebar menu. It's only when the result.aspx file is displayed that
the sidebar menu shows no menuitems...
>
Any thoughts?
>
Jeff
>
>
"GarthS" <GarthS@.discussions.microsoft.comwrote in message
news:AF1F5849-1230-4B46-B58F-49547A835A99@.microsoft.com...
Quote:
Originally Posted by
>>I don't think that your problem has anything to do with the redirect.
>>
>You could try separating the
><siteMapNode url="~/Search.aspx" title="Search" description="" />
><siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
><siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
>>
>into a separate sitemap file and creating a new SitemapProvider that the
>side menu would bind to (you can specify the sitemap file in the sitempa
>definintion)
>>
>or
>(and I haven't tried this myself)
>The sitemap schema allows you to specify a provider or sitemap file on a
>sitempa node. So what you might be able to do is:
>>
><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
> <siteMapNode url="Default.aspx" title="Home" description="">
> <siteMapNode url="~/Network.aspx" title="Network" description=""
>siteMapFile="newFile.sitemap">
> </siteMapNode>
> <siteMapNode url="~/Result.aspx" title="Result" description=""
>siteMapFile="newFile.sitemap">
> </siteMapNode>
> <siteMapNode url="" title="Forum" description="" />
> </siteMapNode>
></siteMap>
>>
>Note that when the XMLSitemapProvider tries to find a node it search the
>node list by url, including the querystring. This could cause you
>problems,
>you may need to strore the name query string parameter in session.
>>
>Hope this helps,
>>
>Garth
>>
>"Jeff" wrote:
>>
Quote:
Originally Posted by
>>Hey
>>>
>>asp.net 2.0
>>>
>>My webportal consist of 2 menus (a header menu which goes horizontally
>>across the top of the page. And a sidebar menu to the left. The
>>menuitmes
>>shown in the sidebar menu is dependent on what menuitem is selected in
>>the
>>main menu.)
>>>
>><?xml version="1.0" encoding="utf-8" ?>
>><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
>> <siteMapNode url="Default.aspx" title="Home" description="">
>> <siteMapNode url="~/Network.aspx" title="Network"
>>description="" >
>> <siteMapNode url="~/Search.aspx" title="Search"
>>description="" />
>> <siteMapNode url="~/pageA.aspx" title="ItemA" description=""
>>/>
>> <siteMapNode url="~/pageB.aspx" title="ItemB" description=""
>>/>
>> </siteMapNode>
>> <siteMapNode url="" title="Forum" description="" />
>> </siteMapNode>
>></siteMap>
>>>
>>When the "Network" menuitem in my main menu is clicked the sidebar menu
>>displays these menu items "Search", "ItemA", "ItemB". So now if the user
>>clicks on the "Search" menuitem in the sidebar menu, the sidebar menu
>>continue to display the same menuitems ("Search", "ItemA", "ItemB").
>>>
>>Problem:
>>In the "Search.aspx" file there is a button (btnSearch), which when
>>clicked
>>executes this code:
>>protected void btnSearch_Click(object sender, EventArgs e)
>>{
>> Response.Redirect("~/Result.aspx?name=" + txtFullname.Text);
>>}
>>>
>>So when the result.aspx page is displayed. the sidebar menu is empty. I
>>think this must be related to using "Response.Redirect" to open the
>>"result.aspx" page. When the "result.aspx" page is opened. I want the
>>sidebar menu to continue to display the same menuitems ("Search",
>>"ItemA",
>>"ItemB") as it did in the "search.aspx" page.
>>>
>>Any suggestions?
>>>
>>Jeff
>>>
>>>
>>>
>
>
Jeff,
Moving the side menu items into another sitemap wont fix your problem
directly but it will allow you to reuse those items as a submenu to the
results page if you add it as a sitemap node (the Network and Results nodes
point to the same file so if you change the sidew menu items its reflected in
both).
Can you post your settings for each of your SiteMapDataSources? (primarily
ShowStartingNode, StartFromCurrentNode, StartingNodeOffset and
StartingNodeUrl).
I'm thinking that adding the results page ot the sitemap will be problematic
due to the query string component added when you redirect. What you may be
able to do is set the side menu sitemap datasource StartingNodeUrl property
(if your using it as per the walkthrough) in the Page_Load of the
results.aspx.
Garth
"Jeff" wrote:
Quote:
Originally Posted by
Thanks for replying so soon to my thread!
>
I don't quite understand (rememeber I'm a newbie) how this could solve my
problem. I mean I don't understand how putting the sidebar menuitems in it's
own sitemap file / provider could fix it... It works today with 1 sitemap
file and 1 provider. The problem is with the result.aspx page which is not
accessible through the menu. (currently not added to the sitemap, but could
add it if that is recommended)
>
Maybe I should have added that I based the configuration of my menus on
article: http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx which shows
how to combine 2 menus, one menu dependent on the other menu.
>
When the user clicks on the "Network" menuitem in the main menu, the sidebar
menu displays "Search", "ItemA", "ItemB" menuitems. It continue to display
these menuitems when the user clicks on the "Search" menuitem in the sidebar
menu. It's only when the result.aspx file is displayed that the sidebar menu
shows no menuitems...
>
Any thoughts?
>
Jeff
>
>
"GarthS" <GarthS@.discussions.microsoft.comwrote in message
news:AF1F5849-1230-4B46-B58F-49547A835A99@.microsoft.com...
Quote:
Originally Posted by
I don't think that your problem has anything to do with the redirect.
You could try separating the
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
into a separate sitemap file and creating a new SitemapProvider that the
side menu would bind to (you can specify the sitemap file in the sitempa
definintion)
or
(and I haven't tried this myself)
The sitemap schema allows you to specify a provider or sitemap file on a
sitempa node. So what you might be able to do is:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="~/Result.aspx" title="Result" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>
Note that when the XMLSitemapProvider tries to find a node it search the
node list by url, including the querystring. This could cause you
problems,
you may need to strore the name query string parameter in session.
Hope this helps,
Garth
"Jeff" wrote:
Quote:
Originally Posted by
Hey
>
asp.net 2.0
>
My webportal consist of 2 menus (a header menu which goes horizontally
across the top of the page. And a sidebar menu to the left. The menuitmes
shown in the sidebar menu is dependent on what menuitem is selected in
the
main menu.)
>
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description=""
>
<siteMapNode url="~/Search.aspx" title="Search" description=""
/>
<siteMapNode url="~/pageA.aspx" title="ItemA" description=""
/>
<siteMapNode url="~/pageB.aspx" title="ItemB" description=""
/>
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>
>
When the "Network" menuitem in my main menu is clicked the sidebar menu
displays these menu items "Search", "ItemA", "ItemB". So now if the user
clicks on the "Search" menuitem in the sidebar menu, the sidebar menu
continue to display the same menuitems ("Search", "ItemA", "ItemB").
>
Problem:
In the "Search.aspx" file there is a button (btnSearch), which when
clicked
executes this code:
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Redirect("~/Result.aspx?name=" + txtFullname.Text);
}
>
So when the result.aspx page is displayed. the sidebar menu is empty. I
think this must be related to using "Response.Redirect" to open the
"result.aspx" page. When the "result.aspx" page is opened. I want the
sidebar menu to continue to display the same menuitems ("Search",
"ItemA",
"ItemB") as it did in the "search.aspx" page.
>
Any suggestions?
>
Jeff
>
>
>
>
>
>
newbie: My code crashes
asp.net 2.0
I'm trying to make a webpage that shows a list of pictures. When the user
clicks on a picture, the user is redirected to another page in my website.
The links are generated at runtime
My code crashes during runtime because of a variable in the ItemDataBound
event is null. Below I show my problem code and maybe some of you could give
me a suggestion to what should do to fix this...
<td rowspan="2"><a id="LinkToProfile" href="http://links.10026.com/?link="><asp:Image ID="MemberPhoto"
runat="server" ImageAlign="Left" /></a></td>
System.Web.UI.HtmlControls.HtmlAnchor link = null;
link =
(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");
link.HRef = "../test.aspx?id=" + subscriber.UserName;
My code crashes because the variable "link" is null after this line "link =
(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");"
Any suggestions that may solve this problem are very welcome :-)
JeffThat is because there is no control with the id "LinkToProfile". You
have to put runat="server" in the tag to make it a server control.
Jeff wrote:
Quote:
Originally Posted by
hey
>
asp.net 2.0
>
I'm trying to make a webpage that shows a list of pictures. When the user
clicks on a picture, the user is redirected to another page in my website.
The links are generated at runtime
>
My code crashes during runtime because of a variable in the ItemDataBound
event is null. Below I show my problem code and maybe some of you could give
me a suggestion to what should do to fix this...
>
>
<td rowspan="2"><a id="LinkToProfile" href="http://links.10026.com/?link="><asp:Image ID="MemberPhoto"
runat="server" ImageAlign="Left" /></a></td>
>
System.Web.UI.HtmlControls.HtmlAnchor link = null;
link =
(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");
link.HRef = "../test.aspx?id=" + subscriber.UserName;
>
My code crashes because the variable "link" is null after this line "link =
(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");"
>
Any suggestions that may solve this problem are very welcome :-)
>
Jeff
>
>
Why not dynamically generated ImageButtons and set the image and postbackUrl
on the control to do what you desire. You can then have complete control
without a lot of code and use a control that is designed to do both of the
tasks you desire.
--
Gregory A. Beamer
*************************************************
Think Outside the Box!
*************************************************
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23Pma5OmoGHA.5104@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
hey
>
asp.net 2.0
>
I'm trying to make a webpage that shows a list of pictures. When the user
clicks on a picture, the user is redirected to another page in my website.
The links are generated at runtime
>
My code crashes during runtime because of a variable in the ItemDataBound
event is null. Below I show my problem code and maybe some of you could
give me a suggestion to what should do to fix this...
>
>
<td rowspan="2"><a id="LinkToProfile" href="http://links.10026.com/?link="><asp:Image ID="MemberPhoto"
runat="server" ImageAlign="Left" /></a></td>
>
System.Web.UI.HtmlControls.HtmlAnchor link = null;
link =
(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");
link.HRef = "../test.aspx?id=" + subscriber.UserName;
>
My code crashes because the variable "link" is null after this line "link
=
(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");"
>
Any suggestions that may solve this problem are very welcome :-)
>
Jeff
>
>
Thanks for the advice, I will try it.
"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@.comcast.netNoSpamMwrote in
message news:Oax8NlqoGHA.4960@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
Why not dynamically generated ImageButtons and set the image and
postbackUrl on the control to do what you desire. You can then have
complete control without a lot of code and use a control that is designed
to do both of the tasks you desire.
>
--
Gregory A. Beamer
>
*************************************************
Think Outside the Box!
*************************************************
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23Pma5OmoGHA.5104@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
>hey
>>
>asp.net 2.0
>>
>I'm trying to make a webpage that shows a list of pictures. When the user
>clicks on a picture, the user is redirected to another page in my
>website. The links are generated at runtime
>>
>My code crashes during runtime because of a variable in the ItemDataBound
>event is null. Below I show my problem code and maybe some of you could
>give me a suggestion to what should do to fix this...
>>
>>
><td rowspan="2"><a id="LinkToProfile" href="http://links.10026.com/?link="><asp:Image ID="MemberPhoto"
>runat="server" ImageAlign="Left" /></a></td>
>>
>System.Web.UI.HtmlControls.HtmlAnchor link = null;
>link =
>(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");
>link.HRef = "../test.aspx?id=" + subscriber.UserName;
>>
>My code crashes because the variable "link" is null after this line "link
>=
>(System.Web.UI.HtmlControls.HtmlAnchor)e.Item.Find Control("LinkToProfile");"
>>
>Any suggestions that may solve this problem are very welcome :-)
>>
>Jeff
>>
>>
>
>
Newbie: Multiple codebehind files
I'm not certain this can be done but it sure seems like it. I'd like to use
multiple C# codebehind files in an aspx page. The idea is that a number of
common functions, like wiring data sources, could be done in a similar
fashion for various controls across multiple pages. What makes sense to me
then would be to have an aspx page that uses a codebehind file. That file
would reference classes in a second file that did the common work.
Assuming I'm on the right track, how would you do this? Is it enough to
simply have both .cs files in the same folder or should each be referenced
in the @dotnet.itags.org.Page's Inherits and Src attributes? Basically, I think the idea
should work, but I'm missing the details on referencing and location.
For example, a control:
<asp:DropDownList id="ddlWidgets" runat="server" /
would be referenced in the codebehind's Page_Load method:
protected void Page_Load( Object Source, EventArgs Args )
{
if (!IsPostBack)
{
WireUpControl( ddlWidgets, "Widgets" );
}
}
where WireUpControl is a method in a class located in a different file that
takes a reference to the control and a table name and binds that table's
data to the control.
TIA,
JohnYou don't need multiple code behinds, just multiple class files if you
will... In which case you can add event handlers etc...
you could have nothing but your event handlers in your code behind that make
reference to other classes.. or, if you have a page that your going to use a
lot of functions a lot... inherit it from system.web.ui.page, creating
your own class with those functions you want.
Then inherit that page into all your otherpages... boom...
This is really effective if you have say a search bar on every page... Just
for example.
-CJ
"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:unKWETKbDHA.384@.TK2MSFTNGP12.phx.gbl...
> Hi All,
> I'm not certain this can be done but it sure seems like it. I'd like to
use
> multiple C# codebehind files in an aspx page. The idea is that a number
of
> common functions, like wiring data sources, could be done in a similar
> fashion for various controls across multiple pages. What makes sense to
me
> then would be to have an aspx page that uses a codebehind file. That file
> would reference classes in a second file that did the common work.
> Assuming I'm on the right track, how would you do this? Is it enough to
> simply have both .cs files in the same folder or should each be referenced
> in the @.Page's Inherits and Src attributes? Basically, I think the idea
> should work, but I'm missing the details on referencing and location.
> For example, a control:
> <asp:DropDownList id="ddlWidgets" runat="server" />
> would be referenced in the codebehind's Page_Load method:
> protected void Page_Load( Object Source, EventArgs Args )
> {
> if (!IsPostBack)
> {
> WireUpControl( ddlWidgets, "Widgets" );
> }
> }
> where WireUpControl is a method in a class located in a different file
that
> takes a reference to the control and a table name and binds that table's
> data to the control.
> TIA,
> John
Hi John,
Speaking from a C# background, and in an OO sense certainly, you should not
be able to inherit from more than one superclass (unless you are using C or
something). So it makes sense to assume you cannot inherit from more than
one 'codebehind'.
The usual practice is to place commonly used functions in a different
abstract superclass, further up the heirarchy. However, don't lean too
heavily on heirarchies, as they can become difficult to maintain in an
extensibility sense. Consider instead using the strategy pattern as an
alternative?
hth,
Ben
"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:unKWETKbDHA.384@.TK2MSFTNGP12.phx.gbl...
> Hi All,
> I'm not certain this can be done but it sure seems like it. I'd like to
use
> multiple C# codebehind files in an aspx page. The idea is that a number
of
> common functions, like wiring data sources, could be done in a similar
> fashion for various controls across multiple pages. What makes sense to
me
> then would be to have an aspx page that uses a codebehind file. That file
> would reference classes in a second file that did the common work.
> Assuming I'm on the right track, how would you do this? Is it enough to
> simply have both .cs files in the same folder or should each be referenced
> in the @.Page's Inherits and Src attributes? Basically, I think the idea
> should work, but I'm missing the details on referencing and location.
> For example, a control:
> <asp:DropDownList id="ddlWidgets" runat="server" />
> would be referenced in the codebehind's Page_Load method:
> protected void Page_Load( Object Source, EventArgs Args )
> {
> if (!IsPostBack)
> {
> WireUpControl( ddlWidgets, "Widgets" );
> }
> }
> where WireUpControl is a method in a class located in a different file
that
> takes a reference to the control and a table name and binds that table's
> data to the control.
> TIA,
> John
"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:unKWETKbDHA.384@.TK2MSFTNGP12.phx.gbl...
> Hi All,
> I'm not certain this can be done but it sure seems like it. I'd like to
use
> multiple C# codebehind files in an aspx page. The idea is that a number
of
> common functions, like wiring data sources, could be done in a similar
> fashion for various controls across multiple pages. What makes sense to
me
> then would be to have an aspx page that uses a codebehind file. That file
> would reference classes in a second file that did the common work.
John,
There are "CodeBehind" files, which are the .aspx.cs files. These are the
"other side" of the .aspx files.
Your web project can contain classes which are not related to a single page.
You can always add these separate classes in .cs files and then reference
them from your codebehind (.aspx.cs) files.
--
John Saunders
Internet Engineer
john.saunders@.surfcontrol.com
Thanks guys. Just the kind of stuff I'm needing.
Desperately looking forward to the day when I can honestly drop the
"Newbie:" tag on my subjects... <g
- John
"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:unKWETKbDHA.384@.TK2MSFTNGP12.phx.gbl...
> Hi All,
> I'm not certain this can be done but it sure seems like it. I'd like to
use
> multiple C# codebehind files in an aspx page. The idea is that a number
of
> common functions, like wiring data sources, could be done in a similar
> fashion for various controls across multiple pages. What makes sense to
me
> then would be to have an aspx page that uses a codebehind file. That file
> would reference classes in a second file that did the common work.
> Assuming I'm on the right track, how would you do this? Is it enough to
> simply have both .cs files in the same folder or should each be referenced
> in the @.Page's Inherits and Src attributes? Basically, I think the idea
> should work, but I'm missing the details on referencing and location.
> For example, a control:
> <asp:DropDownList id="ddlWidgets" runat="server" />
> would be referenced in the codebehind's Page_Load method:
> protected void Page_Load( Object Source, EventArgs Args )
> {
> if (!IsPostBack)
> {
> WireUpControl( ddlWidgets, "Widgets" );
> }
> }
> where WireUpControl is a method in a class located in a different file
that
> takes a reference to the control and a table name and binds that table's
> data to the control.
> TIA,
> John
Newbie: Page level caching in ASP.NET
How could Page level caching be implemented in ASP.NET ? My ASP.NET page
takes some query arguments and I want page level cache to last for the
lifetime of the page generated using the passed arguments only. If different
arguments are passed, I want new page level cache for the new page. Is it as
simple as adding page level variables ? Note page may query data
asynchronously using AJAX also. Does it change things ?
Thanks and regards
NavinAjax shouldn't screw around with anything.
To cache different versions based on querystring values, use the VaryByParam
attribute of the OutputCache control
<%@. OutputCache Duration="3600" VaryByParam="id" %>
assuming "id" is the querystring you want to create a different cache on.
Take a look at:
http://samples.gotdotnet.com/quicks...putcaching.aspx
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Navin Mishra" <navin.mishra@.siemens.com> wrote in message
news:uQ6LgmEAGHA.916@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How could Page level caching be implemented in ASP.NET ? My ASP.NET page
> takes some query arguments and I want page level cache to last for the
> lifetime of the page generated using the passed arguments only. If
> different
> arguments are passed, I want new page level cache for the new page. Is it
> as
> simple as adding page level variables ? Note page may query data
> asynchronously using AJAX also. Does it change things ?
> Thanks and regards
> Navin
>
Thanks. My qyery string is long passing a bunch of arguments. Would it work
for a combination of query string arguments ? Is there a limit ? I also
wanted simple caching while generated page is active and, to use the cache,
when an action is performed on the page. When page is destroyed, I want to
clear THAT page level cache. Would simple page level variables do that are
garbage collected when Page object is destroyed after ASP.NET page request
completes ?
Thanks again and regards
"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uwpW89EAGHA.1256@.TK2MSFTNGP15.phx.gbl...
> Ajax shouldn't screw around with anything.
> To cache different versions based on querystring values, use the
VaryByParam
> attribute of the OutputCache control
> <%@. OutputCache Duration="3600" VaryByParam="id" %>
> assuming "id" is the querystring you want to create a different cache on.
> Take a look at:
> http://samples.gotdotnet.com/quicks...putcaching.aspx
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Navin Mishra" <navin.mishra@.siemens.com> wrote in message
> news:uQ6LgmEAGHA.916@.TK2MSFTNGP10.phx.gbl...
page
it
>
Comments appreciated! Is it possible ?
Thanks in advance and regards
"Navin Mishra" <navin.mishra@.siemens.com> wrote in message
news:%231jq8DLAGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Thanks. My qyery string is long passing a bunch of arguments. Would it
work
> for a combination of query string arguments ? Is there a limit ? I also
> wanted simple caching while generated page is active and, to use the
cache,
> when an action is performed on the page. When page is destroyed, I want to
> clear THAT page level cache. Would simple page level variables do that are
> garbage collected when Page object is destroyed after ASP.NET page request
> completes ?
> Thanks again and regards
> "Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:uwpW89EAGHA.1256@.TK2MSFTNGP15.phx.gbl...
> VaryByParam
on.
> page
> it
>
NEWBIE: passing error to javascript alert
is there a way call a javascript function directly from within asp
page?
Example, here is page load event in C#
protected void Page_Load(object sender, EventArgs e){
// create error
int Var0 = 0;
try {
int iVar1 = 8/Var0;
}
catch (Exception ex){
string sExMsg = ex.Message;
//javascript works fine with string constant
Response.Write("<script type='text/javascript'>alert('In Catch');</
script>");
//can write error to page no problem
Response.Write(sExMsg);
// would like a popup with error
Response.Write("<script language='javascript'>doAlert(" + sExMsg +
");</script>");
Response.Write("<script language='javascript'>function doAlert(sExMsg)
{alert(sExMsg);}</script>");
//write error to log since I can't pop-it-up
//StreamWriter sw = File.AppendText(Server.MapPath("~/error.log"));
//sw.WriteLine(sExMsg);
//sw.Close();
}
}
Any help for a newbie is appreciated
Gi<gijeet@.yahoo.comwrote in message
news:1193076186.658316.66870@.e9g2000prf.googlegrou ps.com...
Quote:
Originally Posted by
Any help for a newbie is appreciated
ClientScript.RegisterStartupScript(GetType(), "error", "alert('In Catch');",
true);
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
ClientScript.RegisterStartupScript(GetType(), "error", "alert('In Catch');",
Quote:
Originally Posted by
true);
Thanks but not sure how to use this. Where do I put this? class
level before page load event? within page load? do I need a
RegisterStartupScript for each alert I wish to use?
Gi
<gijeet@.yahoo.comwrote in message
news:1193079485.948563.150590@.i38g2000prf.googlegr oups.com...
Quote:
Originally Posted by
Quote:
Originally Posted by
>ClientScript.RegisterStartupScript(GetType(), "error", "alert('In
>Catch');",
>true);
>
Thanks but not sure how to use this. Where do I put this?
Wherever you like, so long as you don't Redirect from the page...
Basically, it will send down the JavaScript to run after the page had
loaded...
Quote:
Originally Posted by
do I need a RegisterStartupScript for each alert I wish to use?
Yes.
Incidentally, why are you actually doing this...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Incidentally, why are you actually doing this...?
basically for debugging. I don't like response.writes and I'm trying
to learn javascript. but if you know of a better way to popup alerts,
let me know.
use the debugger to debug. alert debugging is asp classic style :)
"gijeet@.yahoo.com" wrote:
Quote:
Originally Posted by
Quote:
Originally Posted by
Incidentally, why are you actually doing this...?
basically for debugging. I don't like response.writes and I'm trying
to learn javascript. but if you know of a better way to popup alerts,
let me know.
>
>
>
>
>
>
This can help you:
How to Pass Messages and Actions between Server and Client
http://usableasp.net/DeveloperPage...erAndClient.htm
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
<gijeet@.yahoo.comwrote in message
news:1193076186.658316.66870@.e9g2000prf.googlegrou ps.com...
Quote:
Originally Posted by
Hello,
is there a way call a javascript function directly from within asp
page?
Example, here is page load event in C#
>
protected void Page_Load(object sender, EventArgs e){
>
// create error
int Var0 = 0;
try {
int iVar1 = 8/Var0;
}
>
catch (Exception ex){
>
string sExMsg = ex.Message;
>
>
//javascript works fine with string constant
Response.Write("<script type='text/javascript'>alert('In Catch');</
script>");
>
//can write error to page no problem
Response.Write(sExMsg);
>
// would like a popup with error
Response.Write("<script language='javascript'>doAlert(" + sExMsg +
");</script>");
Response.Write("<script language='javascript'>function doAlert(sExMsg)
{alert(sExMsg);}</script>");
>
//write error to log since I can't pop-it-up
//StreamWriter sw = File.AppendText(Server.MapPath("~/error.log"));
//sw.WriteLine(sExMsg);
//sw.Close();
>
}
>
}
>
Any help for a newbie is appreciated
>
Gi
>
"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@.mMvVpPsS.orgwrote in
message news:%23DynzGXFIHA.4880@.TK2MSFTNGP03.phx.gbl...
Quote:
Originally Posted by
This can help you:
How to Pass Messages and Actions between Server and Client
http://usableasp.net/DeveloperPage...erAndClient.htm
Not much use in this particular case, though, as the OP's requirements for
this were for debugging a la ASP Classic...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Newbie: Please help!
I've just started using ASP so I know this will be very easy for most
of you to answer;
I an asp file/page. Here is the code:
<%@dotnet.itags.org.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body
The time is <%= Time %
</body>
</html
I tested it on my PC using a virtual server and it worked fine - told me the
time :)
However, I uploaded the file to some webspace I own, loaded it from my
browser
and all I get is the following output:
The time is
Please please please somebody please tell me what I'm doing wrong? How do
I get a simple ASP page using VBscript to work?
JamesYou may need to repair your IIS mappings.
To do this, run the following command:
aspnet_regiis.exe -i
Here's further information:
http://support.microsoft.com/defaul...B;EN-US;q306005
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
Hi J:
This may be a silly question, but is the webspace you are talking
about .NET Framework enabled? Does it support ASP.NET?
Kevin Parkinson
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
Newbie: Please help!
I've just started using ASP so I know this will be very easy for most
of you to answer;
I an asp file/page. Here is the code:
<%@dotnet.itags.org.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
The time is <%= Time %>
</body>
</html>
I tested it on my PC using a virtual server and it worked fine - told me the
time :)
However, I uploaded the file to some webspace I own, loaded it from my
browser
and all I get is the following output:
The time is
Please please please somebody please tell me what I'm doing wrong? How do
I get a simple ASP page using VBscript to work?
JamesYou may need to repair your IIS mappings.
To do this, run the following command:
aspnet_regiis.exe -i
Here's further information:
http://support.microsoft.com/defaul...B;EN-US;q306005
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
>
Hi J:
This may be a silly question, but is the webspace you are talking
about .NET Framework enabled? Does it support ASP.NET?
Kevin Parkinson
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
>