Monday, March 26, 2012
tabs
r
navigation. How can i create a "tab" look navigation system for my portal?Mike,
Funny you ask...I am working on a similar project. Follow my thread
directly below yours at
http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
"Mike" wrote:
> I'm creating a "portal" type web app and i want to use a "tab" appearance
for
> navigation. How can i create a "tab" look navigation system for my portal
?
>
I too am writing an application with tabs. Wrote mine "by hand" - some HTML
in a user control, and pass a variable to the UC with the current tab. Bit
basic I know but it does the job :o)
"Chris Fink" wrote:
> Mike,
> Funny you ask...I am working on a similar project. Follow my thread
> directly below yours at
> http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
> "Mike" wrote:
>
One way would be to investigate a prebuilt tab control to see if it
offers the functionality you need (and if it includes source, you can
make modifications).
One place to look would be the IE WebControl gallery on asp.net:
http://www.asp.net/ControlGallery/d...y=38&tabindex=2
HTH,
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 15 Oct 2004 07:03:33 -0700, "Chris Fink"
<ChrisFink@.discussions.microsoft.com> wrote:
>Mike,
>Funny you ask...I am working on a similar project. Follow my thread
>directly below yours at
>http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
>"Mike" wrote:
>
Not exactly tabs per se but I accomplished this by using buttons (!).
I put them all right next to each other in a user control, added a
method that changes the active tab and then used CSS to differentiate
(I basically made the button's bottom border go away and made its
background color the same as the page's and bolded the text so it looks
pretty much like a tab, even though it's just a button). The non-active
'tabs' have a totally different background and have all their borders.
It works, even though it may not be perfect.
James
Mike wrote:
> I'm creating a "portal" type web app and i want to use a "tab"
> appearance for navigation. How can i create a "tab" look navigation
> system for my portal?
Hmm.. never gave that one a thought! Guess that's my ASP roots coming throug
h
:)
Another way of doing the tabs might be to use the Tab control that comes
with the IEControls thingy from ASP.NET - don't know if that's the link that
Steve gave - haven't checked.
"James Thomas" wrote:
> Not exactly tabs per se but I accomplished this by using buttons (!).
> I put them all right next to each other in a user control, added a
> method that changes the active tab and then used CSS to differentiate
> (I basically made the button's bottom border go away and made its
> background color the same as the page's and bolded the text so it looks
> pretty much like a tab, even though it's just a button). The non-active
> 'tabs' have a totally different background and have all their borders.
> It works, even though it may not be perfect.
> James
> Mike wrote:
>
>
The only problem with the IE Tab control is that it's not cross-browser
compatible - of course, if that's not what you're striving for, then it
doesn't matter. :)
James
Dan Nash wrote:
> Hmm.. never gave that one a thought! Guess that's my ASP roots coming
> through :)
> Another way of doing the tabs might be to use the Tab control that
> comes with the IEControls thingy from ASP.NET - don't know if that's
> the link that Steve gave - haven't checked.
>
> "James Thomas" wrote:
>
tabs
navigation. How can i create a "tab" look navigation system for my portal?Mike,
Funny you ask...I am working on a similar project. Follow my thread
directly below yours at
http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
"Mike" wrote:
> I'm creating a "portal" type web app and i want to use a "tab" appearance for
> navigation. How can i create a "tab" look navigation system for my portal?
>
I too am writing an application with tabs. Wrote mine "by hand" - some HTML
in a user control, and pass a variable to the UC with the current tab. Bit
basic I know but it does the job :o)
"Chris Fink" wrote:
> Mike,
> Funny you ask...I am working on a similar project. Follow my thread
> directly below yours at
> http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
> "Mike" wrote:
> > I'm creating a "portal" type web app and i want to use a "tab" appearance for
> > navigation. How can i create a "tab" look navigation system for my portal?
One way would be to investigate a prebuilt tab control to see if it
offers the functionality you need (and if it includes source, you can
make modifications).
One place to look would be the IE WebControl gallery on asp.net:
http://www.asp.net/ControlGallery/d...y=38&tabindex=2
HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 15 Oct 2004 07:03:33 -0700, "Chris Fink"
<ChrisFink@.discussions.microsoft.com> wrote:
>Mike,
>Funny you ask...I am working on a similar project. Follow my thread
>directly below yours at
>http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
>"Mike" wrote:
>> I'm creating a "portal" type web app and i want to use a "tab" appearance for
>> navigation. How can i create a "tab" look navigation system for my portal?
>>
>
Not exactly tabs per se but I accomplished this by using buttons (!).
I put them all right next to each other in a user control, added a
method that changes the active tab and then used CSS to differentiate
(I basically made the button's bottom border go away and made its
background color the same as the page's and bolded the text so it looks
pretty much like a tab, even though it's just a button). The non-active
'tabs' have a totally different background and have all their borders.
It works, even though it may not be perfect.
James
Mike wrote:
> I'm creating a "portal" type web app and i want to use a "tab"
> appearance for navigation. How can i create a "tab" look navigation
> system for my portal?
Hmm.. never gave that one a thought! Guess that's my ASP roots coming through
:)
Another way of doing the tabs might be to use the Tab control that comes
with the IEControls thingy from ASP.NET - don't know if that's the link that
Steve gave - haven't checked.
"James Thomas" wrote:
> Not exactly tabs per se but I accomplished this by using buttons (!).
> I put them all right next to each other in a user control, added a
> method that changes the active tab and then used CSS to differentiate
> (I basically made the button's bottom border go away and made its
> background color the same as the page's and bolded the text so it looks
> pretty much like a tab, even though it's just a button). The non-active
> 'tabs' have a totally different background and have all their borders.
> It works, even though it may not be perfect.
> James
> Mike wrote:
> > I'm creating a "portal" type web app and i want to use a "tab"
> > appearance for navigation. How can i create a "tab" look navigation
> > system for my portal?
>
The only problem with the IE Tab control is that it's not cross-browser
compatible - of course, if that's not what you're striving for, then it
doesn't matter. :)
James
Dan Nash wrote:
> Hmm.. never gave that one a thought! Guess that's my ASP roots coming
> through :)
> Another way of doing the tabs might be to use the Tab control that
> comes with the IEControls thingy from ASP.NET - don't know if that's
> the link that Steve gave - haven't checked.
>
> "James Thomas" wrote:
> > Not exactly tabs per se but I accomplished this by using buttons
> > (!).
> > I put them all right next to each other in a user control, added a
> > method that changes the active tab and then used CSS to
> > differentiate (I basically made the button's bottom border go away
> > and made its background color the same as the page's and bolded the
> > text so it looks pretty much like a tab, even though it's just a
> > button). The non-active 'tabs' have a totally different background
> > and have all their borders.
> > It works, even though it may not be perfect.
> > James
> > Mike wrote:
> > > I'm creating a "portal" type web app and i want to use a "tab"
> > > appearance for navigation. How can i create a "tab" look
> > > navigation system for my portal?
Tabs
Does anyone know any good websites for using asp.net web controlled tabs dynamically. For example adding validation using the tabs.
Cheers
Jamie
What do you mean by:>> adding validation using the tabs
Regards
I have a tab page which contains eight tabs. In each of the tabs is fields for a user to fill out. I was wondering when the user clicks on the next tab it will validate what was in the previous tab. e.g. they fll out their address details on one tab but forget to put in a postcode, I want it to validate this before they can access the next tab.
Cheers
This depends on if your tabs post back to update or not.
If they post back:
- Usually only the web controls that are visible in the tab are also marked Visible=true. All the rest are Visible=false. That prevents the validators that are invisible (or attached to invisible controls) from validating.
- The result allows the post back action to validate only the contents of the current tab. Its easiest on the server side, by calling Page.Validate() on the post back event handler for the Tab control (like its Click method). Then test Page.IsValid is true before allowing the tab to switch. If you want to add some client-side code to the tab's event that switches, you should call the same code used by submit buttons:
Page_ClientValidate()
If it returns true, continue switching tabs. False, stop switching tabs.
If they do not post back:
- This means all of the web control - even those that are hidden - are represented in HTML on the page. Those that are hidden have a style value of 'visibility:hidden' or 'display:none".
- If you were to call Page.Validate on the server side or Page_ClientValidate() on the client-side, all validators would fire. That includes the invisible ones. Those invisible ones would report an error (like the field hasn't been filled in yet via a RequiredFieldValidator). So it would not work.
- The solution is to use Validation Groups - available in ASP.NET 2.0 or myProfessional Validation And More. You define a group name for each tab. When you validate, you pass the group name for the tab into Page.Validate() or Page_ClientValidate().
- In addition, if you used my Professional Validation And More, the validators can be setup to detect that the data entry controls which they evaluate are invisible and will not attempt to validate them.
tabs and line breaks lost in Outlook Express
Hi, Folks --
Not sure this is the right forum for this, but I thought I'd try.
I'm sending out emails from my ASP.NET app using the SmtpClient and MailMessage classes. Easy as pie to do this, but the problem is that the \t and \r characters that I include in the MailMessage body are ignored in Outlook Express, so I end up with a big blob of text.
This problem does not occur in Lotus Notes or when I view the emails on the Web.
Any suggestions are greatly appreciated.
Thanks,
Eric
I know outlook express automatically removes extra line breaks from messages. I'm not sure if thats what your encountering.
I'm assuming because your using \t and \r that you arent doing an html body message...is that a possibility or no?
You can try instead of using the \t and \r to use the Chr(13) and chr(20) ASCII designation for whatever language your using, unfortunatly if your using a string literal you may end up with that printed in your message.
Thanks, F.
Using \n instead of \r solved the line break problem in Outlook Express. (I still have to check this in Lotus Notes, but I don't anticipate a problem.)
I also ended up specifying:
message.BodyEncoding = System.Text.
Encoding.UTF8;
for good measure, even though this wasn't necessary for the line break issue.
As for the tabs, could not get them to work, but I'm going to avoid these anyway because the number of spaces rendered per tab is a pain to try to adjust.
Eric
Tabs Control
I downloaded it but can seem to find the control, where is it located?
Please help!
Assistance would be great as this is very important.
tabs for 2.0
i need to create a tabbed page and was wondering the route to take. I'd like
it to be client-side tabs if possible (Atlas?). Does anyone have any good
articles or webcasts on this? or just tips?
thanks
rodcharI used LinkButtons and CSS before I learned about the following which I will
try and use next time I rebuild or start a new tabbed navigation...
So a good start is to find and download CSS Tab Designer and then search for
other blogged articles that use the Menu control with the MultiView control
[1] to create tabbed pages.
Once you see how its done on the server you should be able to reuse the
generated HTML with Atlas and you can show everybody how its done ;-)
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP 432'17"N 882'37"W : 432'17"N 882'37"W
[1]
http://www.java2s.com/Code/ASP/Comp...tabcontrolC.htm
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:558FD3DE-99F1-4726-80B7-9AAFD6A99F56@.microsoft.com...
Quote:
Originally Posted by
hey all,
i need to create a tabbed page and was wondering the route to take. I'd
like
it to be client-side tabs if possible (Atlas?). Does anyone have any good
articles or webcasts on this? or just tips?
>
thanks
rodchar
tabs galore
I'm currently working on an asp.net 2.0 project that has many tabs on the
home page. Behind the scenes seems like a nightmare to manage because all the
tabs represented on the home page is a View control inside a MultiView
control (wow, i know). Well I need to add an extra tab to this and i'm afraid
to touch this thing.
does anyone know a good a way to abstract this new tab away from the
confusion cloud?
thanks,
rodchar"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:C34A1FC3-BECD-4613-B4EF-4E8468E89FC1@.microsoft.com...
Quote:
Originally Posted by
does anyone know a good a way to abstract this new tab away from the
confusion cloud?
Is this not all set up in the markup, then...?
Hi Mark,
I'm not sure I understand your reply, please forgive me. Could you please
elaborate a little.
Rodchar
"Mark Rae" wrote:
Quote:
Originally Posted by
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:C34A1FC3-BECD-4613-B4EF-4E8468E89FC1@.microsoft.com...
>
Quote:
Originally Posted by
does anyone know a good a way to abstract this new tab away from the
confusion cloud?
>
Is this not all set up in the markup, then...?
>
>
>
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:22125D9D-EE5A-4B36-A76A-DFEE1C5626F1@.microsoft.com...
Quote:
Originally Posted by
I'm not sure I understand your reply, please forgive me. Could you please
elaborate a little.
You mentioned that the tabs were set up using a MultiView control and a lot
of View controls - I was asking if this was done in the markup as opposed to
being dynamically created in code-behind...
Does it not resemble something like this:?
http://www.codeproject.com/aspnet/TabControl.asp
If so, is it not simply a question of adding another <asp:Viewcontrol
wherever you need the new tab to appear...?
yeah that's very true however, what i was wondering is with the basic View
control in place for the new tab could i take the guts of the new tab and
somehow extract it out into another page or user control, or better
suggestions?
"Mark Rae" wrote:
Quote:
Originally Posted by
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:22125D9D-EE5A-4B36-A76A-DFEE1C5626F1@.microsoft.com...
>
Quote:
Originally Posted by
I'm not sure I understand your reply, please forgive me. Could you please
elaborate a little.
>
You mentioned that the tabs were set up using a MultiView control and a lot
of View controls - I was asking if this was done in the markup as opposed to
being dynamically created in code-behind...
>
Does it not resemble something like this:?
http://www.codeproject.com/aspnet/TabControl.asp
>
If so, is it not simply a question of adding another <asp:Viewcontrol
wherever you need the new tab to appear...?
>
>
>
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:1F19E9BB-F448-42CE-90CD-695E33A589C6@.microsoft.com...
Quote:
Originally Posted by
yeah that's very true however, what i was wondering is with the basic View
control in place for the new tab could i take the guts of the new tab and
somehow extract it out into another page or user control, or better
suggestions?
Er, well an <asp:Viewis just a container for other controls, so there's
really nothing to stop you doing anything you want with them...
I'm really not seeing what the problem is here...
i guess i just didn't want to have to go and add new code to the existing
code behind page because it is a huge code behind.
"Mark Rae" wrote:
Quote:
Originally Posted by
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:1F19E9BB-F448-42CE-90CD-695E33A589C6@.microsoft.com...
>
Quote:
Originally Posted by
yeah that's very true however, what i was wondering is with the basic View
control in place for the new tab could i take the guts of the new tab and
somehow extract it out into another page or user control, or better
suggestions?
>
Er, well an <asp:Viewis just a container for other controls, so there's
really nothing to stop you doing anything you want with them...
>
I'm really not seeing what the problem is here...
>
>
>
"rodchar" <rodchar@.discussions.microsoft.comwrote in message
news:D3C0B6A4-CAA7-429E-98CC-0AE762D71435@.microsoft.com...
Quote:
Originally Posted by
>i guess i just didn't want to have to go and add new code to the existing
code behind page because it is a huge code behind.
OK - here's what to do...
1) In Project Explorer, highlight the file in question.
2) Type Ctrl-C
3) Type Ctrl-V
You really will be OK... :-)
tabs galore
I'm currently working on an asp.net 2.0 project that has many tabs on the
home page. Behind the scenes seems like a nightmare to manage because all th
e
tabs represented on the home page is a View control inside a MultiView
control (wow, i know). Well I need to add an extra tab to this and i'm afrai
d
to touch this thing.
does anyone know a good a way to abstract this new tab away from the
confusion cloud?
thanks,
rodchar"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:C34A1FC3-BECD-4613-B4EF-4E8468E89FC1@.microsoft.com...
> does anyone know a good a way to abstract this new tab away from the
> confusion cloud?
Is this not all set up in the markup, then...?
Hi Mark,
I'm not sure I understand your reply, please forgive me. Could you please
elaborate a little.
Rodchar
"Mark Rae" wrote:
> "rodchar" <rodchar@.discussions.microsoft.com> wrote in message
> news:C34A1FC3-BECD-4613-B4EF-4E8468E89FC1@.microsoft.com...
>
> Is this not all set up in the markup, then...?
>
>
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:22125D9D-EE5A-4B36-A76A-DFEE1C5626F1@.microsoft.com...
> I'm not sure I understand your reply, please forgive me. Could you please
> elaborate a little.
You mentioned that the tabs were set up using a MultiView control and a lot
of View controls - I was asking if this was done in the markup as opposed to
being dynamically created in code-behind...
Does it not resemble something like this:?
http://www.codeproject.com/aspnet/TabControl.asp
If so, is it not simply a question of adding another <asp:View> control
wherever you need the new tab to appear...?
yeah that's very true however, what i was wondering is with the basic View
control in place for the new tab could i take the guts of the new tab and
somehow extract it out into another page or user control, or better
suggestions?
"Mark Rae" wrote:
> "rodchar" <rodchar@.discussions.microsoft.com> wrote in message
> news:22125D9D-EE5A-4B36-A76A-DFEE1C5626F1@.microsoft.com...
>
> You mentioned that the tabs were set up using a MultiView control and a lo
t
> of View controls - I was asking if this was done in the markup as opposed
to
> being dynamically created in code-behind...
> Does it not resemble something like this:?
> http://www.codeproject.com/aspnet/TabControl.asp
> If so, is it not simply a question of adding another <asp:View> control
> wherever you need the new tab to appear...?
>
>
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:1F19E9BB-F448-42CE-90CD-695E33A589C6@.microsoft.com...
> yeah that's very true however, what i was wondering is with the basic View
> control in place for the new tab could i take the guts of the new tab and
> somehow extract it out into another page or user control, or better
> suggestions?
Er, well an <asp:View> is just a container for other controls, so there's
really nothing to stop you doing anything you want with them...
I'm really not seeing what the problem is here...
i guess i just didn't want to have to go and add new code to the existing
code behind page because it is a huge code behind.
"Mark Rae" wrote:
> "rodchar" <rodchar@.discussions.microsoft.com> wrote in message
> news:1F19E9BB-F448-42CE-90CD-695E33A589C6@.microsoft.com...
>
> Er, well an <asp:View> is just a container for other controls, so there's
> really nothing to stop you doing anything you want with them...
> I'm really not seeing what the problem is here...
>
>
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D3C0B6A4-CAA7-429E-98CC-0AE762D71435@.microsoft.com...
>i guess i just didn't want to have to go and add new code to the existing
> code behind page because it is a huge code behind.
OK - here's what to do...
1) In Project Explorer, highlight the file in question.
2) Type Ctrl-C
3) Type Ctrl-V
You really will be OK... :-)
Tabs in ASP.Net
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 an ASP.NET Application
application? (VB.NET)
I am having a hard time understanding how it works and where to begin. Any
insight would be greatly appreciated.DOTNETGUY wrote:
> Does anyone havea good article on how to setup Tabs in an ASP.NET
> application? (VB.NET)
> I am having a hard time understanding how it works and where to begin. Any
> insight would be greatly appreciated.
Tabs as in hitting the TAB key, or tabs as in a tabbed form?
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Tabbed forms...sorry.
"Curt_C [MVP]" wrote:
> DOTNETGUY wrote:
> > Does anyone havea good article on how to setup Tabs in an ASP.NET
> > application? (VB.NET)
> > I am having a hard time understanding how it works and where to begin. Any
> > insight would be greatly appreciated.
> Tabs as in hitting the TAB key, or tabs as in a tabbed form?
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
DOTNETGUY wrote:
> Tabbed forms...sorry.
We built our own tabbed form. Basically it was single row of table cells
where the click posted back and determined what to show in the bottom
half. We also did a version with no postback that used div's with
hide/show specified with the onclick() events of the hrefs used in the
"tab" cells.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Has anyone created something like this Tab / Multi-page control form that
uses generic object such that it can be used in Netscape, Opera, Mozilla,
etc? The IE Webcontrols only work with, of course, IE.
"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:OefC%23gjgFHA.3692@.TK2MSFTNGP09.phx.gbl...
> DOTNETGUY wrote:
> > Tabbed forms...sorry.
> We built our own tabbed form. Basically it was single row of table cells
> where the click posted back and determined what to show in the bottom
> half. We also did a version with no postback that used div's with
> hide/show specified with the onclick() events of the hrefs used in the
> "tab" cells.
>
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
Tabs in ASP.NET 2.0
Question for all the .NET gurus. I would like to implement tabs in the web application I'm developing. Many that I've talked to and read are pointing me in the direction of AJAX. I would rather wait for another release of AJAX before I start using it, but my question is: Isn't tabs available in ASP.NET 2.0without getting AJAX? For example, when I go to the built in ASP.NET Web Administration Tool it obviously uses tabs and looks like it is built using ASP.NET 2.0 only. I like the look, feel and functionality of the Web Administration tool and want to implement something similiar in my Web Apps. So if this is using it, why can't I without having to get AJAX?
Thanks,
StrickHave a look at the MultiView control.
It kind of depends on what your goal is with the using the tabs.
If it's simply a style of site navigation, it's quite easy to create images and text that duplicate a simple tab look and feel inside a web control. I haven't looked at it closely but I think that's what the ASP.NET configuration web site does in most places. You could then place the control at the top of all of your pages and have it show the right tab for the loaded page. There are plenty of examples around if you Google for them. You can also buy more complex controls that give you more style, functionality, and ease of use options. It really depends on how much you want to code and draw yourself.
If you're wanting a more interactive solution on a single page, you can use the MultiView control to do that. However, you'll still need to code/draw the simulated tabs yourself in much the same way as mentioned above.
AJAX comes into play when you need to have a tabbed display where you want to submit or update parts of a page separate from the rest. For example, you might have an order form where you want to check current inventory levels and warehouse/store locations when a line item is added but you don't want to submit and refresh the whole page to do it.
Thanks guys. I'm going to look into the multiview. Really, I just want it to do the exact same thing that the windows tab control does. Hopefully I won't have to simulate a tab control. If that's the case, I might as well just have separate pages for each hyperlink. I want the multiview to save me the time of having to have separate pages.
Thanks,
Strick
I like the look, feel and functionality of the Web Administration tool and want to implement something similiar in my Web Apps.
The complete source code for the admin tool is in the following folder
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles
Nice, I'll take a look at that. Thanks!
this seems pretty cool:
http://ajax.asp.net/ajaxtoolkit/Tabs/Tabs.aspx
Yeah, I actually downloaded and played with AJAX a little bit last week. It seems really cool. It just seems like it's not integrated into VS 2005 like it should be. I was gonna wait for another version before I start really using it (which is usually my rule of thumb with brand new microsoft products, lol!), but maybe I'll break my rule for AJAX. Maybe I should go get an AJAX book and read it cover to cover...lol. Any recommendations on books?
Yeah, I actually downloaded and played with AJAX a little bit last week. It seems really cool. It just seems like it's not integrated into VS 2005 like it should be. I was gonna wait for another version before I start really using it (which is usually my rule of thumb with brand new microsoft products, lol!), but maybe I'll break my rule for AJAX. Maybe I should go get an AJAX book and read it cover to cover...lol. Any recommendations on books?
if you go to this link:
http://asp.net/learn/videos/default.aspx?tabid=63
and watch the first 2 vids, they will show you how to put the ajax resources and the AjaxConrolToolkit right inside of your toolbox. That makes them pretty much drag n' drop. I couldn't ask for much more integrated. ;)
U know what sucks now? I'm all ready to learn AJAX and the web host I'm with doesn't even support it yet
Well I think in this situation, u better to use MultiView or LoadControl Method either.
Tabs in ASP.Net
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
"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
"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/
Tabs in WebForm
you can learn from it...
http://www.asp.net/Default.aspx?tabindex=9&tabid=47
--
Regards,
HD
Once a Geek... Always a Geek
"mg" <mg@.theworld.com> wrote in message
news:DC8C1B34-1791-4FEE-B4AB-0978C88ED048@.microsoft.com...
> How can I place tabs in a WebForm (C#). On each of the several tabs, I'd
> place what is now a seperate page (WebForm).
Is there anything specific to TABs per se? Sample code, aspx components, etc.?
you dont have a generic component as such... you have to write your own
code...
found a control for you
http://www.asp.net/ControlGallery/C...=193&tabindex=2
--
Regards,
HD
Once a Geek... Always a Geek
"mg" <mg@.theworld.com> wrote in message
news:EA5F7D6A-5EA9-4E33-A1CD-14D36BDD9566@.microsoft.com...
> Is there anything specific to TABs per se? Sample code, aspx components,
> etc.?
mg wrote:
> Is there anything specific to TABs per se? Sample code, aspx
> components, etc.?
Maybe the Microsoft Tab Strip is what you want:
http://www.asp.net/ControlGallery/C...l=73&tabindex=2
--
Jos
interesting one... did not bout internet explorer controls...
have you tried it ? would like to know how they behave on NS
--
Regards,
HD
Once a Geek... Always a Geek
"Jos" <josnospambranders@.fastmail.fm> wrote in message
news:uy7xjWT3DHA.2136@.TK2MSFTNGP12.phx.gbl...
> mg wrote:
>> Is there anything specific to TABs per se? Sample code, aspx
>> components, etc.?
> Maybe the Microsoft Tab Strip is what you want:
> http://www.asp.net/ControlGallery/C...l=73&tabindex=2
> --
> Jos
Hermit Dave wrote:
> interesting one... did not bout internet explorer controls...
> have you tried it ? would like to know how they behave on NS
I have not tried it.
But you can check it out in NS for yourself on this page:
http://msdn.microsoft.com/workshop/...ew/tabstrip.asp
Press the blue "Show me" button at the bottom of the page.
--
Jos
i know having all the browsers is default for web developers... but havent
bothered with NS for over 2 years now..
yeah i did go there... pretty nice... though i have been playing with them
for a few hours... thanks mate
--
Regards,
HD
Once a Geek... Always a Geek
"Jos" <josnospambranders@.fastmail.fm> wrote in message
news:O1vKoHb3DHA.1632@.TK2MSFTNGP12.phx.gbl...
> Hermit Dave wrote:
>> interesting one... did not bout internet explorer controls...
>> have you tried it ? would like to know how they behave on NS
> I have not tried it.
> But you can check it out in NS for yourself on this page:
> http://msdn.microsoft.com/workshop/...ew/tabstrip.asp
> Press the blue "Show me" button at the bottom of the page.
> --
> Jos
tabs not working
You might have better luck getting responses in the Portal Starter Kit forum.
hi,
i've checked the forum you suggested. got the answers. thanks.
Tabs...
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?
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 control and Form
I am using a tab strip control on a web page. One of the tabs has a user
control, which has a form with a submit button on it.
If I want to create another form on another tab of the same tab strip
control then, it gives me an error message that only one form can be
created.
I want to create another form with a submit button so that form can be
posted back to the server. Can anyone help me with this?
Thanks
YatinHi,
ASPX page can contain just one server side Form.
You can use the existing Form to send just the current tab controls by
using javascript. Alternetivly you can add regular Forms (without
runat=server) as much as you want
Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
TabStrip control
Hi,
This might help:
http://www.codeproject.com/aspnet/WebTabStripUserControl.asp
You can try modifying it to suit your needs.
HTH,
Vivek
And also this client side tab might fit your need:Tabs.
tabstrip control
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/multipage
I've been using the tabstrip and multipage controls and really like the way
this combination allows users to switch between tabs without a postback.
I'd like to get more detailed information about these controls but can only
find basic information on the internet. In particular, I'd like to hide or
disable tabs dynamically and I'm not sure how to do this. I'd appreciate any
examples or insight.
Thanks
Mardyhave you tried using the selectedindexchanged .
But you have to set Autopostback ="true" and remember the tabstrip index
starts from "0"
Hope that helps
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:1DABCC32-74F8-49A9-B8DA-B8DFA4CC9539@.microsoft.com...
> Hello
> I've been using the tabstrip and multipage controls and really like the
way
> this combination allows users to switch between tabs without a postback.
> I'd like to get more detailed information about these controls but can
only
> find basic information on the internet. In particular, I'd like to hide or
> disable tabs dynamically and I'm not sure how to do this. I'd appreciate
any
> examples or insight.
> Thanks
> Mardy
For example
If YourTab.SelectedIndex = 0 Then
tsHoriz.Items(0).Enabled = True
tsHoriz.Items(1).Enabled = False
End If
Hope this helps
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:1DABCC32-74F8-49A9-B8DA-B8DFA4CC9539@.microsoft.com...
> Hello
> I've been using the tabstrip and multipage controls and really like the
way
> this combination allows users to switch between tabs without a postback.
> I'd like to get more detailed information about these controls but can
only
> find basic information on the internet. In particular, I'd like to hide or
> disable tabs dynamically and I'm not sure how to do this. I'd appreciate
any
> examples or insight.
> Thanks
> Mardy
Patrick Thanks
I'm using the tabstip as a series of input screens to capture information,
Once the process is complete, I need to hide one of the tabs. So I'd like to
hide an entire tab dynamically from the code behind if the status of the
record is "approved".
I tried using the example you gave but had no success.
"Patrick.O.Ige" wrote:
> For example
> If YourTab.SelectedIndex = 0 Then
> tsHoriz.Items(0).Enabled = True
> tsHoriz.Items(1).Enabled = False
> End If
> Hope this helps
> Patrick
> "Mardy" <Mardy@.discussions.microsoft.com> wrote in message
> news:1DABCC32-74F8-49A9-B8DA-B8DFA4CC9539@.microsoft.com...
> way
> only
> any
>
>
I think I got it
Aspx page:
<iewc:tabstrip id="tsHoriz" runat="server" >
<iewc:Tab Text="Assessment Details" id="tab0"></iewc:Tab>
<iewc:TabSeparator id="ts0"></iewc:TabSeparator>
<iewc:Tab Text="Allocate Requirements" id="tab1"></iewc:Tab>
<iewc:TabSeparator id="ts1"></iewc:TabSeparator>
<iewc:Tab Text="Results" id="tab2"></iewc:Tab>
<iewc:TabSeparator id="ts2"></iewc:TabSeparator>
<iewc:Tab Text=" Design Comments" id="tab3"></iewc:Tab>
<iewc:TabSeparator id="ts3"></iewc:TabSeparator>
<iewc:Tab Text="Attachments" id="tab4"></iewc:Tab>
<iewc:TabSeparator DefaultStyle="width:100%;"></iewc:TabSeparator>
<iewc:multipage id="mpHoriz" ...>
<iewc:PageView id="p0">...
</iewc:PageView>
<iewc:PageView id="p1">...
</iewc:PageView>
...
</iewc:multipage>
code behind:
Protected tab0 As Microsoft.Web.UI.WebControls.Tab
Protected ts0 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab1 As Microsoft.Web.UI.WebControls.Tab
Protected ts1 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab2 As Microsoft.Web.UI.WebControls.Tab
Protected ts2 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab3 As Microsoft.Web.UI.WebControls.Tab
Protected ts3 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab4 As Microsoft.Web.UI.WebControls.Tab
Protected p0 As Microsoft.Web.UI.WebControls.PageView
Protected p1 As Microsoft.Web.UI.WebControls.PageView
Protected p2 As Microsoft.Web.UI.WebControls.PageView
Protected p3 As Microsoft.Web.UI.WebControls.PageView
Protected p4 As Microsoft.Web.UI.WebControls.PageView
'in my sub that checks status of the current record.
tsHoriz.Items.Remove(tab1)
tsHoriz.Items.Remove(ts1)
mpHoriz.Controls.Remove(p1)
Mardy
"Mardy" wrote:
> Hello
> I've been using the tabstrip and multipage controls and really like the wa
y
> this combination allows users to switch between tabs without a postback.
> I'd like to get more detailed information about these controls but can onl
y
> find basic information on the internet. In particular, I'd like to hide or
> disable tabs dynamically and I'm not sure how to do this. I'd appreciate a
ny
> examples or insight.
> Thanks
> Mardy
Try using :- tsHoriz.Items(1).Enabled = False
There were some issues when i worked with the TABSTRIP but can't really
recall now.
Let me know if that doesn;t work and i''ll get back to you.
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:6D81C4DC-03EF-4C9C-8A13-4965D67E901B@.microsoft.com...
> One final note
> This gets me close BUT if I have a postback anywhere in the tabstrip
page,
> I get a nasty viewstate error. This is apparently due to the removal of
the
> mutipage item.
>
>
> "Mardy" wrote:
>
the way
postback.
only
hide or
appreciate any
Tried that without success
"Patrick.O.Ige" wrote:
> Try using :- tsHoriz.Items(1).Enabled = False
> There were some issues when i worked with the TABSTRIP but can't really
> recall now.
> Let me know if that doesn;t work and i''ll get back to you.
> Patrick
>
> "Mardy" <Mardy@.discussions.microsoft.com> wrote in message
> news:6D81C4DC-03EF-4C9C-8A13-4965D67E901B@.microsoft.com...
> page,
> the
> the way
> postback.
> only
> hide or
> appreciate any
>
>
Will get back to you
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:F8258DBF-204D-44D5-88AD-B6C78EEBAA2B@.microsoft.com...
> Tried that without success
> "Patrick.O.Ige" wrote:
>
of
like
can
Mardy..
This should guide you with the Tabstrip:-
http://aspnet101.com/aspnet101/tutorials.aspx?id=28
Hope that helps
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:F8258DBF-204D-44D5-88AD-B6C78EEBAA2B@.microsoft.com...
> Tried that without success
> "Patrick.O.Ige" wrote:
>
of
like
can