Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Monday, March 26, 2012

TabPage Control ?

Hello,

I want to create a TabPage control for my web application like one page layout with 2 different pages, but in the toolbox VS2005 doesn't have that option, So instead of creating 2 different pages and directing from one to the another, I'm wondering if I could use the TabPage control to keep one page layout and have the ability to flip back and fourth from one page to another, Does anyone knows how to do it and really appreciated if have any tips or suggestions on how to accomplish this, thanks

Have you considered using the ASP.NET AJAX TabControl or using a MultiView control to simulates Tabs?


I would consider to try both if it works, How do you setup the ASP.NET AJAX TabControl in Visual Studio 2005 ? In the toolbox control it doesn't have any TabControl option, all I have is the MultiView in the toolbox but I'm not sure how to setup the multi page inside the MultiView control, Can you guide me through this? thanks


Refer the the link below for an example on using the ASP.NET AJAX TabControl.

http://www.asp.net/learn/ajax-videos/video-156.aspx

Here are a few links for the MultiView Control.

http://www.codeproject.com/aspnet/TabControl.asp

http://www.c-sharpcorner.com/UploadFile/mahesh/Multiview10092005215233PM/Multiview.aspx?ArticleID=ad731f33-820e-4968-89fa-393c43872384

http://www.internet.com/video/ Scroll down the leftside under Developer Videos the Using ASP.NET 2.0 MultiView Control is the last one.

Hope these help.

Tabs in ASP.Net

I am looking for a way to add tabs to my asp.net pages. I saw an
application that had tabs on it. It seem as they did it with javascript,
because when you click on each tab. It didn't post back to the server to
load the tab information.

Any Suggestions?
MarkIt can be done on the client side using divs which are positioned one on top
of the other, and by changing the Z-order of the divs.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"SouthSpawn" <southspawn@.aol.com> wrote in message
news:1405e751c119caa9997ebc3d65258101@.localhost.ta lkaboutsoftware.com...
>I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?
> Mark
> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.

Right. There is no such thing as 'tabs' in HTML. So, you need to fake it. If
you want it to work all client-side, then you need to use Javascript.

Typically, you have a variety of links and then you use a javascript
function to swap the CSS display: attribute for each 'panel' from BLOCK to
NONE.

-Darrel
Kevin,

Can you give me a small code example of this?

Mark
Hi Mark,

I'm afraid I don't have one. I just know what the tools are, and how to use
them. I could write one, but then again, so could you. You would have to do
the same thing I would: Look up information on the HTML div element, and use
that.

I have a lot of general information in my head, but when it comes to
specifics, I have to look things up just like everybody else. God forbid I
should have to memorize the entire CLR, or the entire HTML DOM! I only know
enough to know what toool to use, not necessarily all the details about
implementing the tool. For that, I rely on my extensive ever-growing
reference library.

For example, the MSDN Library has a complete reference on the HTML DOM. And
Google is my home page! ;-)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"SouthSpawn" <southspawn@.aol.com> wrote in message
news:bd6bdd601af05a79327eac771304fb75@.localhost.ta lkaboutsoftware.com...
> Kevin,
> Can you give me a small code example of this?
> Mark
> Can you give me a small code example of this?

This isn't for tabs, but the concept is the same. Save the below as an HTML
file and then open in your browser to see how things work...

================================================== ==========================
==

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Javascript DIV toggle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /
<script language=javascript type='text/javascript'
// Toggle function graciously provided by Mick White
// be sure to change the path to the close.gif file to match your directly
setup

function toggle(id){
var toggleLink = id + 'Toggle';
if(document.getElementById){
document.getElementById(id).style.display=
document.getElementById(id).style.display == "block"? "none":"block"
document.getElementById(toggleLink).style.backgrou ndImage=
document.getElementById(id).style.display == "block"?
"url(close.gif)":"url(open.gif)"
return;
}

}

function hideTextBlock(id){
if(document.getElementById){
document.getElementById(id).style.display = "none"
return;
}

}

function writeOutToggleLink(spanID, id, linkedText){
document.getElementById(spanID).innerHTML = '<a href="http://links.10026.com/?link=javascript:void(0)"
onClick="toggle(\'details' + id + '\')" id="details' + id + 'Toggle"
class="detailsToggleLink">' + linkedText + '</a>'
}

//================================================== ==========

</script
<style type="text/css"
..details {
text-align: left;
background-color: #ffc;
padding: 10px;
border: 1px solid #cc9;
padding: 5px;
}

/* the open.gif is an icon that shows before the link to indicate that the
text block is now visible */

a.detailsToggleLink, a.detailsToggleLink:hover, a.detailsToggleLink:visited,
a.detailsToggleLink:active {
background: url("open.gif");
color: #666;
text-decoration: none;
border-bottom: 1px dashed #999;
background-repeat: no-repeat;
background-position: 0px 2px;
padding-left: 12px;
}

/* the following styles are just for this page...not needed for the
javascript to work */

body {
background-color: white;
font-family: verdana;
line-height: 150%;
padding: 15px 10%;
}

code {
font-family: monospace;
background-color: #FFFFCC;
border: 1px solid #666;
padding: 10px;
margin: 10px 30px;
display: block;
}

</style
</head
<body onload="writeOutToggleLink('appleToggleSpan', 'Apple', 'Tell me
more');hideTextBlock('detailsApple');writeOutToggl eLink('orangeToggleSpan',
'Orange', 'Tell me more');hideTextBlock('detailsOrange');"
<h1>Javascript DIV toggle</h1
<div class="content"
<h3>How this works</h3
<p>Javascript is used to change the style sheet on the fly for each hidden
block of text. By default, it is set to display: hidden. The javascript link
changes it to display: block, thereby making it visible on the page</p
<p>This has been tested in IE 6/PC and Firefox. It may not work on other
browsers.</p
<p>For each block of text you want to show/hide, you need a 'toggle' link to
call the javascript function that, in turns, changes the CSS of the text
block so that it becomes visible or not visible:
</p>
<code><a href="javascript:void(0)"
onClick="toggle('details[ID]')" id="details[ID]Toggle"
class="detailsToggleLink">Tell
me more</a></code
<p>HOWEVER, we will not actually be placing the above HTML link in our
source code. Instead, we're going to insert the above link via javascript
into an empty SPAN tag. Each 'tell me more' link is actually an empty SPAN
tag. When the page loads, IF the person has javascript, these SPAN tags get
filled with the toggle link that shows/hides the block of text. (if you
don't have javascript, then the toggle links wouldn't do anyting, so there
is no point in showing them to folks that don't have javascript):</p
<code> <span id="[id]ToggleSpan"></span></code
<p>And each block of content you want toggled on and off will have be
wrapped in a div that looks like this:</p>
<code><div id="details[ID]"
class="details"></code
<p>For each toggle set (link + block of text) you need to replace the
'[ID]' in the above code with a unique word. This allows the main javascript
function to uniquely identify each set an only enact upon that particular
set at a time.</p
<p>Then, to put it all together, we need to call some events in the BODY
tag when the page loads. For each set of toggle links + text block, we need
to do two things. First, we need to insert the HTML link into the empty SPAN
tags. Secondly, we need to hide the text boxes when the page first loads. We
do this so that if a person doesn't have javascript, they don't see the
links, and the text isn't hidden from them.</p
<code> <body onload="writeOutToggleLink('[ID]ToggleSpan', 'Apple',
'Tell me more');hideTextBlock('details[ID]');"></code>
<p>The above functions are written as such:</p>
<p>writeOutToggleLink(the ID of the span you want the link inserted into,
the keyword you are using for this set, the actual text of the link)</p>
<p>hideTextBlock(the DIV ID of the text block)</p>
<p>You will need to call each of those functions for each of the sets of
links/textblocks that you have on the page.</p>
<hr
<p>Sample Link 1 (using ID of 'Apple')
<span id="appleToggleSpan"></span></p
<div id="detailsApple" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div
<p>Sample Link 2 (using ID of 'orange') <span
id="orangeToggleSpan"></span></p
<div id="detailsOrange" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div
</div
</body
</html
"SouthSpawn" <southspawn@.aol.com> wrote in
news:1405e751c119caa9997ebc3d65258101@.localhost.ta lkaboutsoftware.com:

> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?

ASP.NET's IE Controls does have a tab control... but it's IE specific.

Do a google search for Javascript Tabs, you'll find several examples : )

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Tabs in ASP.Net

I am looking for a way to add tabs to my asp.net pages. I saw an
application that had tabs on it. It seem as they did it with javascript,
because when you click on each tab. It didn't post back to the server to
load the tab information.
Any Suggestions?
MarkIt can be done on the client side using divs which are positioned one on top
of the other, and by changing the Z-order of the divs.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S Is What You Get.
"SouthSpawn" <southspawn@.aol.com> wrote in message
news:1405e751c119caa9997ebc3d65258101@.lo
calhost.talkaboutsoftware.com...
>I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?
> Mark
>
> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
Right. There is no such thing as 'tabs' in HTML. So, you need to fake it. If
you want it to work all client-side, then you need to use Javascript.
Typically, you have a variety of links and then you use a javascript
function to swap the CSS display: attribute for each 'panel' from BLOCK to
NONE.
-Darrel
Kevin,
Can you give me a small code example of this?
Mark
Hi Mark,
I'm afraid I don't have one. I just know what the tools are, and how to use
them. I could write one, but then again, so could you. You would have to do
the same thing I would: Look up information on the HTML div element, and use
that.
I have a lot of general information in my head, but when it comes to
specifics, I have to look things up just like everybody else. God forbid I
should have to memorize the entire CLR, or the entire HTML DOM! I only know
enough to know what toool to use, not necessarily all the details about
implementing the tool. For that, I rely on my extensive ever-growing
reference library.
For example, the MSDN Library has a complete reference on the HTML DOM. And
Google is my home page! ;-)
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S Is What You Get.
"SouthSpawn" <southspawn@.aol.com> wrote in message
news:bd6bdd601af05a79327eac771304fb75@.lo
calhost.talkaboutsoftware.com...
> Kevin,
> Can you give me a small code example of this?
> Mark
>
> Can you give me a small code example of this?
This isn't for tabs, but the concept is the same. Save the below as an HTML
file and then open in your browser to see how things work...
========================================
====================================
==
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Javascript DIV toggle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language=javascript type='text/javascript'>
// Toggle function graciously provided by Mick White
// be sure to change the path to the close.gif file to match your directly
setup
function toggle(id){
var toggleLink = id + 'Toggle';
if(document.getElementById){
document.getElementById(id).style.display=
document.getElementById(id).style.display == "block"? "none":"block"
document.getElementById(toggleLink).style.backgroundImage=
document.getElementById(id).style.display == "block"?
"url(close.gif)":"url(open.gif)"
return;
}
}
function hideTextBlock(id){
if(document.getElementById){
document.getElementById(id).style.display = "none"
return;
}
}
function writeOutToggleLink(spanID, id, linkedText){
document.getElementById(spanID).innerHTML = '<a href="http://links.10026.com/?link=java script:void(0)"
onClick="toggle('details' + id + '')" id="details' + id + 'Toggle"
class="detailsToggleLink">' + linkedText + '</a>'
}
// ========================================
====================
</script>
<style type="text/css">
.details {
text-align: left;
background-color: #ffc;
padding: 10px;
border: 1px solid #cc9;
padding: 5px;
}
/* the open.gif is an icon that shows before the link to indicate that the
text block is now visible */
a.detailsToggleLink, a.detailsToggleLink:hover, a.detailsToggleLink:visited,
a.detailsToggleLink:active {
background: url("open.gif");
color: #666;
text-decoration: none;
border-bottom: 1px dashed #999;
background-repeat: no-repeat;
background-position: 0px 2px;
padding-left: 12px;
}
/* the following styles are just for this page...not needed for the
javascript to work */
body {
background-color: white;
font-family: verdana;
line-height: 150%;
padding: 15px 10%;
}
code {
font-family: monospace;
background-color: #FFFFCC;
border: 1px solid #666;
padding: 10px;
margin: 10px 30px;
display: block;
}
</style>
</head>
<body onload="writeOutToggleLink('appleToggleSpan', 'Apple', 'Tell me
more');hideTextBlock('detailsApple');wri
teOutToggleLink('orangeToggleSpan',
'Orange', 'Tell me more');hideTextBlock('detailsOrange');">
<h1>Javascript DIV toggle</h1>
<div class="content">
<h3>How this works</h3>
<p>Javascript is used to change the style sheet on the fly for each hidden
block of text. By default, it is set to display: hidden. The javascript link
changes it to display: block, thereby making it visible on the page</p>
<p>This has been tested in IE 6/PC and Firefox. It may not work on other
browsers.</p>
<p>For each block of text you want to show/hide, you need a 'toggle' link to
call the javascript function that, in turns, changes the CSS of the text
block so that it becomes visible or not visible:
</p>
<code><a href="http://links.10026.com/?link=java script:void(0)"
onClick="toggle('details[ID]')" id="details[ID]Toggle"
class="detailsToggleLink">Tell
me more</a></code>
<p>HOWEVER, we will not actually be placing the above HTML link in our
source code. Instead, we're going to insert the above link via javascript
into an empty SPAN tag. Each 'tell me more' link is actually an empty SPAN
tag. When the page loads, IF the person has javascript, these SPAN tags get
filled with the toggle link that shows/hides the block of text. (if you
don't have javascript, then the toggle links wouldn't do anyting, so there
is no point in showing them to folks that don't have javascript):</p>
<code> <span id="[id]ToggleSpan"></span></code>
<p>And each block of content you want toggled on and off will have be
wrapped in a div that looks like this:</p>
<code><div id="details[ID]"
class="details"></code>
<p>For each toggle set (link + block of text) you need to replace the
'[ID]' in the above code with a unique word. This allows the main javascript
function to uniquely identify each set an only enact upon that particular
set at a time.</p>
<p>Then, to put it all together, we need to call some events in the BODY
tag when the page loads. For each set of toggle links + text block, we need
to do two things. First, we need to insert the HTML link into the empty SPAN
tags. Secondly, we need to hide the text boxes when the page first loads. We
do this so that if a person doesn't have javascript, they don't see the
links, and the text isn't hidden from them.</p>
<code> <body onload=& quot;writeOutToggleLink('[ID]ToggleSpan'
, 'Apple',
'Tell me more');hideTextBlock('details[ID]');"></code>
<p>The above functions are written as such:</p>
<p>writeOutToggleLink(the ID of the span you want the link inserted into,
the keyword you are using for this set, the actual text of the link)</p>
<p>hideTextBlock(the DIV ID of the text block)</p>
<p>You will need to call each of those functions for each of the sets of
links/textblocks that you have on the page.</p>
<hr>
<p>Sample Link 1 (using ID of 'Apple')
<span id="appleToggleSpan"></span></p>
<div id="detailsApple" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div>
<p>Sample Link 2 (using ID of 'orange') <span
id="orangeToggleSpan"></span></p>
<div id="detailsOrange" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div>
</div>
</body>
</html>
"SouthSpawn" <southspawn@.aol.com> wrote in
news:1405e751c119caa9997ebc3d65258101@.lo
calhost.talkaboutsoftware.com:

> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?
ASP.NET's IE Controls does have a tab control... but it's IE specific.
Do a google search for Javascript Tabs, you'll find several examples : )
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]

Tabs...

Hi guys and girls,
I have seen the tabs on this page here (http://66.129.71.130/QuickStartv20/aspnet/doc/pages/syntax.aspx#render) to switch from VB to C#. Are those tabs easy to do? Any tips?
Any tip would be great, I am just in the process of moving from PHP to ASP.NET :)Hi,

it's done by setting the display style (css) with client side javascript so it doesn't require a postback to the server. I created some sample code that you might want to check out here:http://forums.asp.net/887783/ShowPost.aspx

Grz, Kris.
Ah, thank you for that example. I think I will be able to work with that...

Saturday, March 24, 2012

TabStrip + Multipage WebControl: Modify width?

Hello,
I use the TabStrip and the Multipage Webcontrol in my Web form. I have
three Tabs/Pages. However, I would like to define an area to the left
and to the right. Controls in these areas should always be visible.
Therefore I have put the TabStrip/Multipage inside a column of a HTML
table. The table consists of one row with three columns. But this
doesn't work at all. The table destroys the design of the PageViews,
but there should be space enough in the column to view the whole
PageViews.
As another approach I moved everything between a PageView into a User
control, one for each PageView. Then I included the User Controls. It
works fine, but as soon as I put the TabStrip/Multipage inside a HTML
column as above, it doesn't work either (which doesn't surprise me
since a User Control is little more than including).
As a final approach I replaced the MultiPage with three Panels. Each
of the panel should serve as a container for a PageView. Only one
panel should be visible at a time. I initialize each panel with its
User Control:
private void Page_Load(object sender, System.EventArgs e)
{
if(! IsPostBack)
{
devicePage = (Device)(LoadControl("Device.ascx") );
devicePage.ID = "devicePage";
Panel1.Controls.Add(devicePage);
pcbPage = (PCB)(LoadControl("PCB.ascx") );
pcbPage.ID = "pcbPage";
Panel2.Controls.Add(pcbPage);
boundCondPage = (BoundCond)(LoadControl("BoundCond.ascx") );
boundCondPage.ID = "boundCondPage";
Panel3.Controls.Add(boundCondPage);
tsHoriz.SelectedIndex = 0;
Panel1.Visible = true;
Panel2.Visible = false;
Panel3.Visible = false;
...
}
}
Also, I have set the AutoPostBack property of the TabStrip control to
true
and I have implemented a SelectedIndexChange handler for the TabStrip
control:
private void tsHoriz_SelectedIndexChange(object sender,
System.EventArgs e)
{
switch(tsHoriz.SelectedIndex)
{
case 0:
Panel1.Visible = true;
Panel2.Visible = false;
Panel3.Visible = false;
break;
case 1:
Panel1.Visible = false;
Panel2.Visible = true;
Panel3.Visible = false;
break;
case 2:
Panel1.Visible = false;
Panel2.Visible = false;
Panel3.Visible = true;
break;
}
...
But this doesn't work either. Only at first load does the first panel
appear with the appropriate User Control. As soon as I select another
tab, the User Control assigned with this tab isn't displayed. Also,
when I return to tab one the User Control assigned with the first
panel has disappeared too. It seems that the application forgets that
the Panels are populated with their corresponding User Controls. Note
that the User Control variables (i.e. devicePage, pcbPage, and
boundCondPage) are real member variables so they can't possibly go out
of scope.
So how can I get the functionality of a TabStrip + Multipage with
adjustible width?
(I have noticed that I *can* set the height of the Multipage. I can
have a button below the TabStrip/Multipage that is alway visible. I
guess that this is possible because I don't have to use a table to do
that: I simply can write the code for the button below the
TabStrip/Multipage code in the aspx file. But this is not what I want.
I want the button to appear right to the TabStrip/Multipage, but
always visible.)
Any help would be great.
Best regards
JohannesPlacing a tabstrip/pageview in a table should be no problem -- we have about
40 different pages
that do exactly the same thing without problems.
However, you need to be very careful that the HTML that is generated is accu
rate and legal; the
tabstrip/pageview and very sensitive to unclosed td/tr/table tags. You might
want to run the
tabstrip/pageview in downlevel mode to see if that makes a difference (I don
't recall how to do
that, but you can add config value to web.config to force it to run in downl
evel); you might try a
Mozilla browser to see if there's a difference (in Mozilla, there will be a
small gab on the
tabstrip above the pageview; this is because the HTML that the IE web contro
ls generates needs a bit
of tweak -- but the goal here is to solve the left/right padding).
When I've had problems with my tabstrip/pageviews; what I do is view the HTM
L source and then
cut/paste to a HTML edit (VS) and then reformat and make sure I have closed
all of the tags.
I don't know what your base browser requirements are; however if you just wa
nt to add some padding
around the tabstrip/pageivew look into using a <div style="padding-left: 10p
x">your-controls</div>.
Scott
"Johannes Eble" <skywalkerpackage@.hotmail.com> wrote in message
news:nm0h609iksp17to3m1c3vmq5dgbc9ohqp6@.
4ax.com...
> Hello,
> I use the TabStrip and the Multipage Webcontrol in my Web form. I have
> three Tabs/Pages. However, I would like to define an area to the left
> and to the right. Controls in these areas should always be visible.
> Therefore I have put the TabStrip/Multipage inside a column of a HTML
> table. The table consists of one row with three columns. But this
> doesn't work at all. The table destroys the design of the PageViews,
> but there should be space enough in the column to view the whole
> PageViews.
> As another approach I moved everything between a PageView into a User
> control, one for each PageView. Then I included the User Controls. It
> works fine, but as soon as I put the TabStrip/Multipage inside a HTML
> column as above, it doesn't work either (which doesn't surprise me
> since a User Control is little more than including).
> As a final approach I replaced the MultiPage with three Panels. Each
> of the panel should serve as a container for a PageView. Only one
> panel should be visible at a time. I initialize each panel with its
> User Control:
> private void Page_Load(object sender, System.EventArgs e)
> {
> if(! IsPostBack)
> {
> devicePage = (Device)(LoadControl("Device.ascx") );
> devicePage.ID = "devicePage";
> Panel1.Controls.Add(devicePage);
> pcbPage = (PCB)(LoadControl("PCB.ascx") );
> pcbPage.ID = "pcbPage";
> Panel2.Controls.Add(pcbPage);
> boundCondPage = (BoundCond)(LoadControl("BoundCond.ascx") );
> boundCondPage.ID = "boundCondPage";
> Panel3.Controls.Add(boundCondPage);
> tsHoriz.SelectedIndex = 0;
> Panel1.Visible = true;
> Panel2.Visible = false;
> Panel3.Visible = false;
>
> ...
> }
> }
> Also, I have set the AutoPostBack property of the TabStrip control to
> true
> and I have implemented a SelectedIndexChange handler for the TabStrip
> control:
> private void tsHoriz_SelectedIndexChange(object sender,
> System.EventArgs e)
> {
> switch(tsHoriz.SelectedIndex)
> {
> case 0:
> Panel1.Visible = true;
> Panel2.Visible = false;
> Panel3.Visible = false;
> break;
> case 1:
> Panel1.Visible = false;
> Panel2.Visible = true;
> Panel3.Visible = false;
> break;
> case 2:
> Panel1.Visible = false;
> Panel2.Visible = false;
> Panel3.Visible = true;
> break;
> }
> ...
>
> But this doesn't work either. Only at first load does the first panel
> appear with the appropriate User Control. As soon as I select another
> tab, the User Control assigned with this tab isn't displayed. Also,
> when I return to tab one the User Control assigned with the first
> panel has disappeared too. It seems that the application forgets that
> the Panels are populated with their corresponding User Controls. Note
> that the User Control variables (i.e. devicePage, pcbPage, and
> boundCondPage) are real member variables so they can't possibly go out
> of scope.
> So how can I get the functionality of a TabStrip + Multipage with
> adjustible width?
> (I have noticed that I *can* set the height of the Multipage. I can
> have a button below the TabStrip/Multipage that is alway visible. I
> guess that this is possible because I don't have to use a table to do
> that: I simply can write the code for the button below the
> TabStrip/Multipage code in the aspx file. But this is not what I want.
> I want the button to appear right to the TabStrip/Multipage, but
> always visible.)
>
> Any help would be great.
>
> Best regards
>
> Johannes
>
>
Hi Scott,
thanks very much for your answer.
You were probably right, i.e. some of the table tags were probably
garbled. I started a new web form. Then I placed the table, the
tabstrip and the multipage. Finally I placed the user controls one
after another. Now, everything seems to work fine, within the table.
Regards
Johannes

TabStrip code in VB.NET

Hi,

I've tried to find a way to connect .aspx pages to a TabStrip webctrl but I've only found code with embedded <table><tr> stuff.

Can anyone help me finding some useful code?

TIA

/Kennethtake a look at the tabstrip control at www.asp.net, comes with the
sourcecode

--
Regards

John Timney (Microsoft ASP.NET MVP)
--------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
--------------

"Kenneth" <anonymous@.discussions.microsoft.com> wrote in message
news:4A56DAA1-7BF9-4396-94DD-D28F86D644F8@.microsoft.com...
> Hi,
> I've tried to find a way to connect .aspx pages to a TabStrip webctrl but
I've only found code with embedded <table><tr> stuff.
> Can anyone help me finding some useful code?
> TIA
> /Kenneth
John,

This is exactly what I mean. in www.asp.net they're referring to the ie web ctrls and tabstrip can't handle urlnavigation to existing .aspx documents.

The IEWebCtrls are NOT the correct answer.

/Kenneth
well you can set IE controls... TabStrip exactly to do a postback... in the
postback you can check for the SelectedIndex and post it to whatever aspx
name you need to.
its not the most elegant way but it sure does the job.

private void tsNav_SelectedIndexChange(object sender, System.EventArgs e)
{
SetNav();
}
private void SetNav()
{
switch(tsNav.SelectedIndex)
{
case 0:
myLoader.Attributes.Add("src", "CA_ShowEarlyBird.aspx");
break;
case 1:
myLoader.Attributes.Add("src", "CA_ShowCategories.aspx");
break;
case 2:
myLoader.Attributes.Add("src", "CA_ShowSubCategories.aspx");
break;
case 3:
myLoader.Attributes.Add("src", "CA_ShowAvailableColors.aspx");
break;
case 4:
myLoader.Attributes.Add("src", "CA_ShowAvailableSizes.aspx");
break;
case 5:
myLoader.Attributes.Add("src", "CA_ShowProducts.aspx");
break;
case 6:
Response.Redirect("~/Signout.aspx");
break;
}
}

and it sure does work...

--
Regards,
HD
Once a Geek... Always a Geek
"Kenneth" <anonymous@.discussions.microsoft.com> wrote in message
news:3A86E31B-3662-4D24-8F95-14A7676DA18D@.microsoft.com...
> John,
> This is exactly what I mean. in www.asp.net they're referring to the ie
> web ctrls and tabstrip can't handle urlnavigation to existing .aspx
> documents.
> The IEWebCtrls are NOT the correct answer.
> /Kenneth

tabstrip control

Can I use the tabstrip control and have clicks on different tabs to go to different aspx pages ? The tabstrip example in msdn have clicks on different tabs to execute different sections of the code in the same page.

Could anyone give me an example of how to do this?

TIAI don't know if you are looking for something like that howevertake a look here

Tabstrip like behavior of Menu

I have a Horizontal menu with menu items like Contacts, Health, etc. I also have web pages called Contacts.aspx, Health.aspx, etc.

I want the menu to behave like a tabstrip so I am trying NavigateURL along with Target property of the MenuItem Collection.

What I want is, when the user clicks on a "Tab", that tab should become active. How would I do that?Maybe you can use the DynamicSelectedStyle or StaticSelectedStyle property of the Menu control to change the style of the selected item
I don't want to launch another window. I can do a Target=_self to launch it in the same window but the problem with that is I loose the menu. Maybe I can define nested Master Page so that the menu is retained across pages.
Is there any other (easier) way to implement this?

Thursday, March 22, 2012

Take Application off line quickly

Suppose I need to make an ASP.NET Web application inaccessible to anyone
trying to open any of its pages. How can this be done quickly - and in a way
that allows me to bring the whole thing back online quickly?1) Shut down IIS - of course this will give them a page not found type of
error
2) You can configure a virtual directory in IIS to redirect to a given URL.
This URL can then inform the user that the site is down and to try again
later. This would probably be more user friendly.
"Guadala Harry" <GMan@.NoSpam.com> wrote in message
news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Suppose I need to make an ASP.NET Web application inaccessible to anyone
> trying to open any of its pages. How can this be done quickly - and in a
way
> that allows me to bring the whole thing back online quickly?
>
You could just stop the IIS site. You could also hanlde this in the app
itself if needed (especially if it could be interesting to "filter" those
who are allowed to log on when the app is in this particular state).
The overall goal may yield a better suggestion.
Patrice
"Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Suppose I need to make an ASP.NET Web application inaccessible to anyone
> trying to open any of its pages. How can this be done quickly - and in a
way
> that allows me to bring the whole thing back online quickly?
>
Yes - the overall goal (small detail!): Here it is: I have to periodically
bring a site down for maintenance (anywhere from 2 minutes to 2 hours;
install upgaded assemblies, updated aspx files, modify database etc); during
which period I don't want anyone to come in - and after which I want to
allow everyone back in of course. I don't mind killing existing sessions
(could easily pick a time of day to minimize such occurances in this
low-volume application). It would be great if the user could see some
informative message when they attempt to open any page in the site - rather
than some error that drives them to call tech support.
Thanks!
-GH
"Patrice" <nobody@.nowhere.com> wrote in message
news:uAZQII8rEHA.4008@.TK2MSFTNGP14.phx.gbl...
> You could just stop the IIS site. You could also hanlde this in the app
> itself if needed (especially if it could be interesting to "filter" those
> who are allowed to log on when the app is in this particular state).
> The overall goal may yield a better suggestion.
> Patrice
> --
> "Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
> news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> way
>
Ok so you have the options :
- virtual dir as suggested by Marina
- adding this into the app will allow some accounts to connect so that you
can check that it works before bringing things online again.
As a side note, I believe to have read that ASP.NET actually caches the DLLs
(including ASPX code behind) so that you can update DLLs and pages "on the
fly". You could ask this in a separate thread. For the database, you could
prepare a script.
Though I admit we have no high volume (vertical applications) and that users
are generally located in the same country (allowing to update during lunch
or after the day work), IMO you could look also if you can shorten the time
it takes to perform this update and in some cases it could be even almost
useless to "close" the site.
As an additonal note, you may want also to display a "message of the day"
*before* the update so that they know the site *will* be updated while they
work. Bascially I would see :
- Schelded date for the next update and expected duratino (few days before)
- a warning message or blocking the site during the update (tyhat should be
IMO almost "automated" ie blocking or anbeling the warning, copying prepared
files to update DLLs and pages, running a script)
- you do the final check by hand and can correct what unexpectedly goes
wrong
- when all is ok, you manually enable the site again
Patrice
"Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
news:ObCupT8rEHA.736@.tk2msftngp13.phx.gbl...
> Yes - the overall goal (small detail!): Here it is: I have to
periodically
> bring a site down for maintenance (anywhere from 2 minutes to 2 hours;
> install upgaded assemblies, updated aspx files, modify database etc);
during
> which period I don't want anyone to come in - and after which I want to
> allow everyone back in of course. I don't mind killing existing sessions
> (could easily pick a time of day to minimize such occurances in this
> low-volume application). It would be great if the user could see some
> informative message when they attempt to open any page in the site -
rather
> than some error that drives them to call tech support.
> Thanks!
> -GH
>
> "Patrice" <nobody@.nowhere.com> wrote in message
> news:uAZQII8rEHA.4008@.TK2MSFTNGP14.phx.gbl...
those
anyone
a
>
Thanks!
"Patrice" <nobody@.nowhere.com> wrote in message
news:eLAomg8rEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Ok so you have the options :
> - virtual dir as suggested by Marina
> - adding this into the app will allow some accounts to connect so that you
> can check that it works before bringing things online again.
> As a side note, I believe to have read that ASP.NET actually caches the
DLLs
> (including ASPX code behind) so that you can update DLLs and pages "on the
> fly". You could ask this in a separate thread. For the database, you could
> prepare a script.
> Though I admit we have no high volume (vertical applications) and that
users
> are generally located in the same country (allowing to update during lunch
> or after the day work), IMO you could look also if you can shorten the
time
> it takes to perform this update and in some cases it could be even almost
> useless to "close" the site.
> As an additonal note, you may want also to display a "message of the day"
> *before* the update so that they know the site *will* be updated while
they
> work. Bascially I would see :
> - Schelded date for the next update and expected duratino (few days
before)
> - a warning message or blocking the site during the update (tyhat should
be
> IMO almost "automated" ie blocking or anbeling the warning, copying
prepared
> files to update DLLs and pages, running a script)
> - you do the final check by hand and can correct what unexpectedly goes
> wrong
> - when all is ok, you manually enable the site again
> Patrice
> --
> "Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
> news:ObCupT8rEHA.736@.tk2msftngp13.phx.gbl...
> periodically
> during
> rather
app
> those
> anyone
in
> a
>

Take Application off line quickly

Suppose I need to make an ASP.NET Web application inaccessible to anyone
trying to open any of its pages. How can this be done quickly - and in a way
that allows me to bring the whole thing back online quickly?1) Shut down IIS - of course this will give them a page not found type of
error
2) You can configure a virtual directory in IIS to redirect to a given URL.
This URL can then inform the user that the site is down and to try again
later. This would probably be more user friendly.

"Guadala Harry" <GMan@.NoSpam.com> wrote in message
news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Suppose I need to make an ASP.NET Web application inaccessible to anyone
> trying to open any of its pages. How can this be done quickly - and in a
way
> that allows me to bring the whole thing back online quickly?
You could just stop the IIS site. You could also hanlde this in the app
itself if needed (especially if it could be interesting to "filter" those
who are allowed to log on when the app is in this particular state).

The overall goal may yield a better suggestion.

Patrice

--

"Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Suppose I need to make an ASP.NET Web application inaccessible to anyone
> trying to open any of its pages. How can this be done quickly - and in a
way
> that allows me to bring the whole thing back online quickly?
Yes - the overall goal (small detail!): Here it is: I have to periodically
bring a site down for maintenance (anywhere from 2 minutes to 2 hours;
install upgaded assemblies, updated aspx files, modify database etc); during
which period I don't want anyone to come in - and after which I want to
allow everyone back in of course. I don't mind killing existing sessions
(could easily pick a time of day to minimize such occurances in this
low-volume application). It would be great if the user could see some
informative message when they attempt to open any page in the site - rather
than some error that drives them to call tech support.

Thanks!

-GH

"Patrice" <nobody@.nowhere.com> wrote in message
news:uAZQII8rEHA.4008@.TK2MSFTNGP14.phx.gbl...
> You could just stop the IIS site. You could also hanlde this in the app
> itself if needed (especially if it could be interesting to "filter" those
> who are allowed to log on when the app is in this particular state).
> The overall goal may yield a better suggestion.
> Patrice
> --
> "Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
> news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> > Suppose I need to make an ASP.NET Web application inaccessible to anyone
> > trying to open any of its pages. How can this be done quickly - and in a
> way
> > that allows me to bring the whole thing back online quickly?
Ok so you have the options :
- virtual dir as suggested by Marina
- adding this into the app will allow some accounts to connect so that you
can check that it works before bringing things online again.

As a side note, I believe to have read that ASP.NET actually caches the DLLs
(including ASPX code behind) so that you can update DLLs and pages "on the
fly". You could ask this in a separate thread. For the database, you could
prepare a script.

Though I admit we have no high volume (vertical applications) and that users
are generally located in the same country (allowing to update during lunch
or after the day work), IMO you could look also if you can shorten the time
it takes to perform this update and in some cases it could be even almost
useless to "close" the site.

As an additonal note, you may want also to display a "message of the day"
*before* the update so that they know the site *will* be updated while they
work. Bascially I would see :
- Schelded date for the next update and expected duratino (few days before)
- a warning message or blocking the site during the update (tyhat should be
IMO almost "automated" ie blocking or anbeling the warning, copying prepared
files to update DLLs and pages, running a script)
- you do the final check by hand and can correct what unexpectedly goes
wrong
- when all is ok, you manually enable the site again

Patrice

--

"Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
news:ObCupT8rEHA.736@.tk2msftngp13.phx.gbl...
> Yes - the overall goal (small detail!): Here it is: I have to
periodically
> bring a site down for maintenance (anywhere from 2 minutes to 2 hours;
> install upgaded assemblies, updated aspx files, modify database etc);
during
> which period I don't want anyone to come in - and after which I want to
> allow everyone back in of course. I don't mind killing existing sessions
> (could easily pick a time of day to minimize such occurances in this
> low-volume application). It would be great if the user could see some
> informative message when they attempt to open any page in the site -
rather
> than some error that drives them to call tech support.
> Thanks!
> -GH
>
> "Patrice" <nobody@.nowhere.com> wrote in message
> news:uAZQII8rEHA.4008@.TK2MSFTNGP14.phx.gbl...
> > You could just stop the IIS site. You could also hanlde this in the app
> > itself if needed (especially if it could be interesting to "filter"
those
> > who are allowed to log on when the app is in this particular state).
> > The overall goal may yield a better suggestion.
> > Patrice
> > --
> > "Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
> > news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> > > Suppose I need to make an ASP.NET Web application inaccessible to
anyone
> > > trying to open any of its pages. How can this be done quickly - and in
a
> > way
> > > that allows me to bring the whole thing back online quickly?
> >
Thanks!

"Patrice" <nobody@.nowhere.com> wrote in message
news:eLAomg8rEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Ok so you have the options :
> - virtual dir as suggested by Marina
> - adding this into the app will allow some accounts to connect so that you
> can check that it works before bringing things online again.
> As a side note, I believe to have read that ASP.NET actually caches the
DLLs
> (including ASPX code behind) so that you can update DLLs and pages "on the
> fly". You could ask this in a separate thread. For the database, you could
> prepare a script.
> Though I admit we have no high volume (vertical applications) and that
users
> are generally located in the same country (allowing to update during lunch
> or after the day work), IMO you could look also if you can shorten the
time
> it takes to perform this update and in some cases it could be even almost
> useless to "close" the site.
> As an additonal note, you may want also to display a "message of the day"
> *before* the update so that they know the site *will* be updated while
they
> work. Bascially I would see :
> - Schelded date for the next update and expected duratino (few days
before)
> - a warning message or blocking the site during the update (tyhat should
be
> IMO almost "automated" ie blocking or anbeling the warning, copying
prepared
> files to update DLLs and pages, running a script)
> - you do the final check by hand and can correct what unexpectedly goes
> wrong
> - when all is ok, you manually enable the site again
> Patrice
> --
> "Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
> news:ObCupT8rEHA.736@.tk2msftngp13.phx.gbl...
> > Yes - the overall goal (small detail!): Here it is: I have to
> periodically
> > bring a site down for maintenance (anywhere from 2 minutes to 2 hours;
> > install upgaded assemblies, updated aspx files, modify database etc);
> during
> > which period I don't want anyone to come in - and after which I want to
> > allow everyone back in of course. I don't mind killing existing sessions
> > (could easily pick a time of day to minimize such occurances in this
> > low-volume application). It would be great if the user could see some
> > informative message when they attempt to open any page in the site -
> rather
> > than some error that drives them to call tech support.
> > Thanks!
> > -GH
> > "Patrice" <nobody@.nowhere.com> wrote in message
> > news:uAZQII8rEHA.4008@.TK2MSFTNGP14.phx.gbl...
> > > You could just stop the IIS site. You could also hanlde this in the
app
> > > itself if needed (especially if it could be interesting to "filter"
> those
> > > who are allowed to log on when the app is in this particular state).
> > > > The overall goal may yield a better suggestion.
> > > > Patrice
> > > > --
> > > > "Guadala Harry" <GMan@.NoSpam.com> a crit dans le message de
> > > news:uLeqQ17rEHA.1816@.TK2MSFTNGP09.phx.gbl...
> > > > Suppose I need to make an ASP.NET Web application inaccessible to
> anyone
> > > > trying to open any of its pages. How can this be done quickly - and
in
> a
> > > way
> > > > that allows me to bring the whole thing back online quickly?
> > > > > >

Tuesday, March 13, 2012

Target for aspx page

I have an aspx page that is always invoked by Response.Redirect calls from
other pages. I want my aspx page to always display in a new browser window.
Since the Response.Redirect calls from the other pages can't inoke _blank as
a target value, is there any way I can ensure that my aspx page always
displays in a new browser window?
Thanks,
Tinawhy not use javascript instead?
Saber S.
http://maghalat.com (Persian)
"T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
>I have an aspx page that is always invoked by Response.Redirect calls from
> other pages. I want my aspx page to always display in a new browser
> window.
> Since the Response.Redirect calls from the other pages can't inoke _blank
> as
> a target value, is there any way I can ensure that my aspx page always
> displays in a new browser window?
> Thanks,
> Tina
>
It's currently a rule here not to use any javascript. as least we use it as
a last resort.
T
"Saber" <saber[-.-AT.--]maghalat.com> wrote in message
news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> why not use javascript instead?
>
> --
> Saber S.
> http://maghalat.com (Persian)
> "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
from
_blank
>
You can't open a new window from the server. It's a client-side task that
can be accomplished only with a client-side script.
I am just wondering how many successful asp.net sites has the person who
wrote your rules made?
Eliyahu
"T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
> It's currently a rule here not to use any javascript. as least we use it
as
> a last resort.
> T
> "Saber" <saber[-.-AT.--]maghalat.com> wrote in message
> news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> from
> _blank
>
That's not true. take an ordinary Hyperlink on any aspx page that links to
another aspx page. set it's target property to _blank and the new aspx page
will pop up in a new browser window. No client script was involved. I'm
just trying to do the same thing from a respnse.redirect that we all often
do from hyperlinks.
T
"Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
news:Ov7BNzZjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> You can't open a new window from the server. It's a client-side task that
> can be accomplished only with a client-side script.
> I am just wondering how many successful asp.net sites has the person who
> wrote your rules made?
> Eliyahu
> "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
it
> as
always
>
Admitting the mistake in the first statement, thank you, I am still
insisting that you can't make anything more-or-less meaningful in ASP.NET
without good deal of javascripting.
Eliyahu
"GaryB" <gb@.nospam.com> wrote in message
news:O$SZIO7jEHA.3456@.TK2MSFTNGP12.phx.gbl...
> That's not true. take an ordinary Hyperlink on any aspx page that links
to
> another aspx page. set it's target property to _blank and the new aspx
page
> will pop up in a new browser window. No client script was involved. I'm
> just trying to do the same thing from a respnse.redirect that we all often
> do from hyperlinks.
> T
>
> "Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
> news:Ov7BNzZjEHA.3696@.TK2MSFTNGP15.phx.gbl...
that
> it
calls
browser
> always
>
a rule not to use javascript - I am very curious as to why ... and who made
the tech choice to go with .NET? obviously they had a great handle on the
workings of the framework ...
"T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
> It's currently a rule here not to use any javascript. as least we use it
> as
> a last resort.
> T
> "Saber" <saber[-.-AT.--]maghalat.com> wrote in message
> news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> from
> _blank
>
If I understand your question correctly hopefully this will do what you are
wanting
Response.Write("<script
type='text/javascript'>detailedresults=window.open('...Your New Page
Here...');</script>")
Just replace ...Your New Page Here... and it should launch a new window for
you.
William Higgins
"T. Seaburn" wrote:

> I have an aspx page that is always invoked by Response.Redirect calls from
> other pages. I want my aspx page to always display in a new browser windo
w.
> Since the Response.Redirect calls from the other pages can't inoke _blank
as
> a target value, is there any way I can ensure that my aspx page always
> displays in a new browser window?
> Thanks,
> Tina
>
>

Target for aspx page

I have an aspx page that is always invoked by Response.Redirect calls from
other pages. I want my aspx page to always display in a new browser window.
Since the Response.Redirect calls from the other pages can't inoke _blank as
a target value, is there any way I can ensure that my aspx page always
displays in a new browser window?
Thanks,
Tinawhy not use javascript instead?

--
Saber S.
http://maghalat.com (Persian)
"T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
>I have an aspx page that is always invoked by Response.Redirect calls from
> other pages. I want my aspx page to always display in a new browser
> window.
> Since the Response.Redirect calls from the other pages can't inoke _blank
> as
> a target value, is there any way I can ensure that my aspx page always
> displays in a new browser window?
> Thanks,
> Tina
It's currently a rule here not to use any javascript. as least we use it as
a last resort.
T

"Saber" <saber[-.-AT.--]maghalat.com> wrote in message
news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> why not use javascript instead?
>
> --
> Saber S.
> http://maghalat.com (Persian)
> "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
> >I have an aspx page that is always invoked by Response.Redirect calls
from
> > other pages. I want my aspx page to always display in a new browser
> > window.
> > Since the Response.Redirect calls from the other pages can't inoke
_blank
> > as
> > a target value, is there any way I can ensure that my aspx page always
> > displays in a new browser window?
> > Thanks,
> > Tina
You can't open a new window from the server. It's a client-side task that
can be accomplished only with a client-side script.

I am just wondering how many successful asp.net sites has the person who
wrote your rules made?

Eliyahu

"T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
> It's currently a rule here not to use any javascript. as least we use it
as
> a last resort.
> T
> "Saber" <saber[-.-AT.--]maghalat.com> wrote in message
> news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> > why not use javascript instead?
> > --
> > Saber S.
> > http://maghalat.com (Persian)
> > "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> > news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
> > >I have an aspx page that is always invoked by Response.Redirect calls
> from
> > > other pages. I want my aspx page to always display in a new browser
> > > window.
> > > Since the Response.Redirect calls from the other pages can't inoke
> _blank
> > > as
> > > a target value, is there any way I can ensure that my aspx page always
> > > displays in a new browser window?
> > > Thanks,
> > > Tina
> >
That's not true. take an ordinary Hyperlink on any aspx page that links to
another aspx page. set it's target property to _blank and the new aspx page
will pop up in a new browser window. No client script was involved. I'm
just trying to do the same thing from a respnse.redirect that we all often
do from hyperlinks.
T

"Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
news:Ov7BNzZjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> You can't open a new window from the server. It's a client-side task that
> can be accomplished only with a client-side script.
> I am just wondering how many successful asp.net sites has the person who
> wrote your rules made?
> Eliyahu
> "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
> > It's currently a rule here not to use any javascript. as least we use
it
> as
> > a last resort.
> > T
> > "Saber" <saber[-.-AT.--]maghalat.com> wrote in message
> > news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> > > why not use javascript instead?
> > > > > --
> > > Saber S.
> > > http://maghalat.com (Persian)
> > > "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> > > news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
> > > >I have an aspx page that is always invoked by Response.Redirect calls
> > from
> > > > other pages. I want my aspx page to always display in a new browser
> > > > window.
> > > > Since the Response.Redirect calls from the other pages can't inoke
> > _blank
> > > > as
> > > > a target value, is there any way I can ensure that my aspx page
always
> > > > displays in a new browser window?
> > > > Thanks,
> > > > Tina
> > > > > >
Admitting the mistake in the first statement, thank you, I am still
insisting that you can't make anything more-or-less meaningful in ASP.NET
without good deal of javascripting.

Eliyahu

"GaryB" <gb@.nospam.com> wrote in message
news:O$SZIO7jEHA.3456@.TK2MSFTNGP12.phx.gbl...
> That's not true. take an ordinary Hyperlink on any aspx page that links
to
> another aspx page. set it's target property to _blank and the new aspx
page
> will pop up in a new browser window. No client script was involved. I'm
> just trying to do the same thing from a respnse.redirect that we all often
> do from hyperlinks.
> T
>
> "Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
> news:Ov7BNzZjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> > You can't open a new window from the server. It's a client-side task
that
> > can be accomplished only with a client-side script.
> > I am just wondering how many successful asp.net sites has the person who
> > wrote your rules made?
> > Eliyahu
> > "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> > news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
> > > It's currently a rule here not to use any javascript. as least we use
> it
> > as
> > > a last resort.
> > > T
> > > > "Saber" <saber[-.-AT.--]maghalat.com> wrote in message
> > > news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> > > > why not use javascript instead?
> > > > > > > > --
> > > > Saber S.
> > > > http://maghalat.com (Persian)
> > > > "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
> > > > news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
> > > > >I have an aspx page that is always invoked by Response.Redirect
calls
> > > from
> > > > > other pages. I want my aspx page to always display in a new
browser
> > > > > window.
> > > > > Since the Response.Redirect calls from the other pages can't inoke
> > > _blank
> > > > > as
> > > > > a target value, is there any way I can ensure that my aspx page
> always
> > > > > displays in a new browser window?
> > > > > Thanks,
> > > > > Tina
> > > > > > > > > > > >
a rule not to use javascript - I am very curious as to why ... and who made
the tech choice to go with .NET? obviously they had a great handle on the
workings of the framework ...

"T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
news:O$veA1RjEHA.1184@.TK2MSFTNGP12.phx.gbl...
> It's currently a rule here not to use any javascript. as least we use it
> as
> a last resort.
> T
> "Saber" <saber[-.-AT.--]maghalat.com> wrote in message
> news:ek3TiRKjEHA.3696@.TK2MSFTNGP15.phx.gbl...
>> why not use javascript instead?
>>
>>
>> --
>> Saber S.
>> http://maghalat.com (Persian)
>> "T. Seaburn" <tinamseaburn@.removespamexcite.com> wrote in message
>> news:O1hXGsJjEHA.3320@.TK2MSFTNGP11.phx.gbl...
>> >I have an aspx page that is always invoked by Response.Redirect calls
> from
>> > other pages. I want my aspx page to always display in a new browser
>> > window.
>> > Since the Response.Redirect calls from the other pages can't inoke
> _blank
>> > as
>> > a target value, is there any way I can ensure that my aspx page always
>> > displays in a new browser window?
>> > Thanks,
>> > Tina
>>>>
>>

target size

I know how to use javascript to open a hyperlink in a resized window without
toolbars. But would it be better to do so from the code behind pages and if
so, how? which classes? Thanks

Buzother than the code behind setting the url for hyperlink, you got it.

-- bruce (sqlwork.com)

"Buz Waitz" <bwaitz@.sbcglobal.net> wrote in message
news:O3hohLmUEHA.716@.TK2MSFTNGP11.phx.gbl...
> I know how to use javascript to open a hyperlink in a resized window
without
> toolbars. But would it be better to do so from the code behind pages and
if
> so, how? which classes? Thanks
> Buz
>I know how to use javascript to open a hyperlink in a resized window without
>toolbars. But would it be better to do so from the code behind pages and if
>so, how? which classes? Thanks
>Buz

I am pretty sure u need to use javascript, but if u want to call the
javascript from the codebehind try this:

this.RegisterClientScriptBlock("","insertscripthere");

-Adam
client script blocks will not work with xp service pack 2 for this
application. in code behind you can only set the javascript url of the
hyperlink.

-- bruce (sqlwork.com)

<ashelley@.inlandkwpp.com> wrote in message
news:h1fsc090oq4j60kn9lt5rdsicmupjii3a9@.4ax.com...
> >I know how to use javascript to open a hyperlink in a resized window
without
> >toolbars. But would it be better to do so from the code behind pages and
if
> >so, how? which classes? Thanks
> >Buz
> I am pretty sure u need to use javascript, but if u want to call the
> javascript from the codebehind try this:
> this.RegisterClientScriptBlock("","insertscripthere");
> -Adam
On Tue, 15 Jun 2004 11:01:30 -0700, "bruce barker"
<nospam_brubar@.safeco.com> wrote:

>client script blocks will not work with xp service pack 2 for this
>application. in code behind you can only set the javascript url of the
>hyperlink.
>-- bruce (sqlwork.com)

interesting.

function popUp(wUrl,wName,wOpts)
{
//x y are set to current cursor location already
var newWindow;
newWindow = window.open('',wName,wOpts);
if(newWindow)
{

newWindow.document.write('<body><center>wait...</center></body>');
newWindow.document.close();
newWindow.moveTo(x,y);
newWindow.focus();
newWindow.location = wUrl;
}
}

and call

this.RegisterClientScriptBlock("","<script
language='javascript'>popUp('someurl','windowname','someoptions');</script>");

this won't work with xp sp 2?

-Adam

target size

I know how to use javascript to open a hyperlink in a resized window without
toolbars. But would it be better to do so from the code behind pages and if
so, how? which classes? Thanks
Buzother than the code behind setting the url for hyperlink, you got it.
-- bruce (sqlwork.com)
"Buz Waitz" <bwaitz@.sbcglobal.net> wrote in message
news:O3hohLmUEHA.716@.TK2MSFTNGP11.phx.gbl...
> I know how to use javascript to open a hyperlink in a resized window
without
> toolbars. But would it be better to do so from the code behind pages and
if
> so, how? which classes? Thanks
> Buz
>
>I know how to use javascript to open a hyperlink in a resized window without
>toolbars. But would it be better to do so from the code behind pages and if
>so, how? which classes? Thanks
>Buz
>
I am pretty sure u need to use javascript, but if u want to call the
javascript from the codebehind try this:
this.RegisterClientScriptBlock("","insertscripthere");
-Adam
client script blocks will not work with xp service pack 2 for this
application. in code behind you can only set the javascript url of the
hyperlink.
-- bruce (sqlwork.com)
<ashelley@.inlandkwpp.com> wrote in message
news:h1fsc090oq4j60kn9lt5rdsicmupjii3a9@.
4ax.com...
without
if
> I am pretty sure u need to use javascript, but if u want to call the
> javascript from the codebehind try this:
> this.RegisterClientScriptBlock("","insertscripthere");
> -Adam
On Tue, 15 Jun 2004 11:01:30 -0700, "bruce barker"
<nospam_brubar@.safeco.com> wrote:

>client script blocks will not work with xp service pack 2 for this
>application. in code behind you can only set the javascript url of the
>hyperlink.
>-- bruce (sqlwork.com)
>
interesting.
function popUp(wUrl,wName,wOpts)
{
//x y are set to current cursor location already
var newWindow;
newWindow = window.open('',wName,wOpts);
if(newWindow)
{
newWindow.document.write('<body><center>wait...</center></body>');
newWindow.document.close();
newWindow.moveTo(x,y);
newWindow.focus();
newWindow.location = wUrl;
}
}
and call
this.RegisterClientScriptBlock("","<script
language='javascript'> popUp('someurl','windowname','someoption
s');</script>"
);
this won't work with xp sp 2?
-Adam