Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Saturday, March 31, 2012

Table Style

I have the following table in ascx , when I click the button the table style
not showing in the popup , it is ONLY showing on the page not in the
popup...WHY?

<TABLE style="BACKGROUND: #d8e8f5;CURSOR:hand" bgcolor="#d8e8f5"
id="tblMenu" cellSpacing="0"cellPadding="2" width="150" border="1">
<TR>
<TD class="standerdfont" >New Document</TD>
</TR>
<TR>
<TD class="standerdfont">New Folder</TD>
</TR>
</TABLE
this table is shown when user click the button as following:
<TABLE id="Table6" cellSpacing="0" cellPadding="0" width="560" border="0">
<TR>
<TH style="HEIGHT: 14px" vAlign="middle" scope="col" align="right" width="67">
<IMG id=imgAddNew
onmouseover="MM_swapImage('Image15','','/images/<%=strImgName_New_O%>',1)"
style="CURSOR: hand" onclick="showMenu('tblMenu',100,44);"
onmouseout=MM_swapImgRestore() height=23
src="MailTools/images/<%=strImgName_New%>" width=59 border=0 name=Image15
></TH
</table
the javascript function is :

function showMenu(menu, width , height)
{

varlefter= event.clientX;
varleftoff= event.offsetX;
vartopper= event.clientY;
vartopoff= event.offsetY;
varoPopup= window.createPopup();
varoPopBody= oPopup.document.body;
varHTMLContent= eval(menu).innerHTML;
oPopBody.innerHTML = HTMLContent;
oPopup.show(lefter - leftoff - 2, topper - topoff
+22,width,height,document.body);
}In yout javascript function your manipulate with variables. You never change
the html of the popup window. Should be

oPopup.document.body.innerHTML = HTMLContent;

Eliyahu

"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:68DF83CD-6146-4A18-AF92-DBE3AC52FDBE@.microsoft.com...
> I have the following table in ascx , when I click the button the table
style
> not showing in the popup , it is ONLY showing on the page not in the
> popup...WHY?
> <TABLE style="BACKGROUND: #d8e8f5;CURSOR:hand" bgcolor="#d8e8f5"
> id="tblMenu" cellSpacing="0" cellPadding="2" width="150" border="1">
> <TR>
> <TD class="standerdfont" >New Document</TD>
> </TR>
> <TR>
> <TD class="standerdfont">New Folder</TD>
> </TR>
> </TABLE>
> this table is shown when user click the button as following:
> <TABLE id="Table6" cellSpacing="0" cellPadding="0" width="560" border="0">
> <TR>
> <TH style="HEIGHT: 14px" vAlign="middle" scope="col" align="right"
width="67">
> <IMG id=imgAddNew
> onmouseover="MM_swapImage('Image15','','/images/<%=strImgName_New_O%>',1)"
> style="CURSOR: hand" onclick="showMenu('tblMenu',100,44);"
> onmouseout=MM_swapImgRestore() height=23
> src="http://pics.10026.com/?src=MailTools/images/<%=strImgName_New%>" width=59 border=0 name=Image15
> ></TH>
> </table>
>
> the javascript function is :
>
> function showMenu(menu, width , height)
> {
> var lefter = event.clientX;
> var leftoff = event.offsetX;
> var topper = event.clientY;
> var topoff = event.offsetY;
> var oPopup = window.createPopup();
> var oPopBody = oPopup.document.body;
> var HTMLContent = eval(menu).innerHTML;
> oPopBody.innerHTML = HTMLContent;
> oPopup.show(lefter - leftoff - 2, topper - topoff
> + 22, width,height,document.body);
> }
I modified it as following and still wont display the table style

function showMenu(menu, width , height)
{

varlefter= event.clientX;
varleftoff= event.offsetX;
vartopper= event.clientY;
vartopoff= event.offsetY;
varoPopup= window.createPopup();
varHTMLContent= eval(menu).innerHTML;
oPopup.document.body.innerHTML = HTMLContent;
oPopup.show(lefter - leftoff - 2, topper - topoff
+22,width,/*newHeight*/height,document.body);
}

"Eliyahu Goldin" wrote:

> In yout javascript function your manipulate with variables. You never change
> the html of the popup window. Should be
> oPopup.document.body.innerHTML = HTMLContent;
> Eliyahu
> "Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
> news:68DF83CD-6146-4A18-AF92-DBE3AC52FDBE@.microsoft.com...
> > I have the following table in ascx , when I click the button the table
> style
> > not showing in the popup , it is ONLY showing on the page not in the
> > popup...WHY?
> > <TABLE style="BACKGROUND: #d8e8f5;CURSOR:hand" bgcolor="#d8e8f5"
> > id="tblMenu" cellSpacing="0" cellPadding="2" width="150" border="1">
> > <TR>
> > <TD class="standerdfont" >New Document</TD>
> > </TR>
> > <TR>
> > <TD class="standerdfont">New Folder</TD>
> > </TR>
> > </TABLE>
> > this table is shown when user click the button as following:
> > <TABLE id="Table6" cellSpacing="0" cellPadding="0" width="560" border="0">
> > <TR>
> > <TH style="HEIGHT: 14px" vAlign="middle" scope="col" align="right"
> width="67">
> > <IMG id=imgAddNew
> > onmouseover="MM_swapImage('Image15','','/images/<%=strImgName_New_O%>',1)"
> > style="CURSOR: hand" onclick="showMenu('tblMenu',100,44);"
> > onmouseout=MM_swapImgRestore() height=23
> > src="http://pics.10026.com/?src=MailTools/images/<%=strImgName_New%>" width=59 border=0 name=Image15
> > ></TH>
> > </table>
> > the javascript function is :
> > function showMenu(menu, width , height)
> > {
> > var lefter = event.clientX;
> > var leftoff = event.offsetX;
> > var topper = event.clientY;
> > var topoff = event.offsetY;
> > var oPopup = window.createPopup();
> > var oPopBody = oPopup.document.body;
> > var HTMLContent = eval(menu).innerHTML;
> > oPopBody.innerHTML = HTMLContent;
> > oPopup.show(lefter - leftoff - 2, topper - topoff
> > + 22, width,height,document.body);
> > }
>

table that i add at run time, is in the end of page

I"m using this code to add at run time:


Dim maintable As New Table()

Dim row As New TableRow()
Dim cell As New TableCell()
Dim heights As New Unit("200px")
Dim place As New PlaceHolder()
Dim mycontrol As UserControl = LoadControl("smallmenu.ascx")

maintable.Height = heights
maintable.Width = heights

cell.Height = heights
cell.Text = "yaniv"
cell.Controls.Add(mycontrol)

row.Height = heights

row.Cells.Add(cell)

maintable.Rows.Add(row)
maintable.CssClass = "maintable"

Page.Controls.Add(maintable)

place.Controls.Add(mycontrol)

the problem is that the new table sits in the end of the (after the </html> tag) so i get an error massege:
"Control '_ctl2_Button1' of type 'Button' must be placed inside a form tag with runat=server.
"

how can solve that problem?You can use

<asp:table id="maintable" runat="server" width=... height=.. ... > </asp:Table
in your aspx page rather than dynamically creating a maintable in the codebehind.

Use the codebehind to just populate the table rows and columns.

This way you can place the <asp:table... ></asp:Table> wherever you want on the aspx page.

Hope this helps.
i don't want to use the aspx page, because i want this table to inherit to all my other pages...
I dont understand...

If you want to embed the table in all your aspx pages, you can still add an empty asp Table tag like

<asp:Table id="mytable" runat="server"... ...></asp:Table> to every aspx page where you want the table to be displayed.

Now you can still dynamically populate this table from code behind...
sorry to bother, i tried thatone, but the code behind dosen't recognize this table in i add it in the aspx page. i can't run the "maintable.controls.add" in this case. even if i use the dim maintable, and don't you the page.controls.add(maintable) there is no connection between them!
I had the same problem. I asked about it yesterday (only about a DDL).

My kloogy solution was to create a wrapper class:

Public Class ItemPair
Inherits DropDownList
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.RenderBeginTag("form")
MyBase.Render(output)
End Sub
Protected Overrides Sub AddAttributesToRender(ByVal writer As HtmlTextWriter)
writer.RenderEndTag()
End Sub
End Class

You could probably cut and paste and change a couple words and be set.
I posted another asnwer that hasn't shown up yet but here is the link to my question which was very similar to yours:

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=516165

Table width, height setting is not working.

I am trying to divide a main page by 2 like 50% top and 50% bottom. So I tried like a code below but it doesn't divide by 50:50. It seems like 70:30. Does anybody know why it does this?
<asp:Table ID="Table1" runat="server" Width="100%" Height="100%" cellpadding="0" cellspacing="0"> <asp:TableRow ID="TableRow1" runat="server" Width="100%" Height="100%"> <asp:TableCell ID="TableCell1" runat="server" Width="100%" Height="50%">
      ...    </asp:TableCell>        <asp:TableCell ID="TableCell1" runat="server" Width="100%" Height="50%">
      ...    </asp:TableCell> <asp:TableRow><asp:table>
That was wrong code I got above. Here's the right one.
<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:Table ID="Table1" runat="server" Width="100%" Height="100%" cellpadding="0" cellspacing="0"> <asp:TableRow ID="TableRow1" runat="server" Width="100%" Height="50%" > <asp:TableCell ID="TableCell1" runat="server" Width="100%" Height="100%" BackColor="red" > </asp:TableCell> </asp:TableRow> <asp:TableRow ID="TableRow2" runat="server" Width="100%" Height="50%"> <asp:TableCell ID="TableCell2" runat="server" Width="100%" Height="100%" BackColor="blue"> </asp:TableCell> </asp:TableRow> </asp:Table> </form></body></html>

Another question.

With the code above, even thought I specified the height to 50% to each, it only shows for one row not the whole page.

Please tell me how to divide a page into top half and bottom half so when I set background colors for each half, I can see the division by color.

 _____________________________________| || || || Red || || ||_____________________________________|| || || || Blue || || ||_____________________________________|To set like this.

table1_onclick generated without javascript function

Hi,

I have a website in dotnet2.0 with a masterpage.

Here is my code of page wich use the masterpage :

<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" CodeFile="WfSelectExp.aspx.vb" Inherits="WebForm_WfSelectExp" MasterPageFile="~/MasterPage.master" Title="Appolo" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %><asp:Content ID="ContentSelectBL" ContentPlaceHolderID="ContentPlaceHolderCentral" runat="Server"> <table border="0" cellpadding="0" cellspacing="0" class="TABLE" width="100%"> <tr> <td colspan="2" style="height: 10px; width: 5px;"></td> </tr> <tr> <td style="width: 5px;"></td> <td align="center"> <table id="Table" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td><!-- table presentation -->

And IIS will generated a page with the following code :

 <table id="TABLE1" border="0" cellpadding="0" cellspacing="0" class="TABLE" onload="javascript:CloseFenAttente()" style="height: 87%" width="100%" onclick="return TABLE1_onclick()"> <tr> <td colspan="5" style="height: 5px; width: 5px;"> <input type="hidden" name="ctl00$ContentPlaceHolderCentral$HiddenFieldPoidsTotal" id="ctl00_ContentPlaceHolderCentral_HiddenFieldPoidsTotal" value="0" /> <input type="hidden" name="ctl00$ContentPlaceHolderCentral$HiddenFieldQuantCommPAL" id="ctl00_ContentPlaceHolderCentral_HiddenFieldQuantCommPAL" value="0" /> <input type="hidden" name="ctl00$ContentPlaceHolderCentral$HiddenFieldQuantExpPAL" id="ctl00_ContentPlaceHolderCentral_HiddenFieldQuantExpPAL" value="0" /> <input type="hidden" name="ctl00$ContentPlaceHolderCentral$HiddenFieldQuantCommUL" id="ctl00_ContentPlaceHolderCentral_HiddenFieldQuantCommUL" value="0" /> <input type="hidden" name="ctl00$ContentPlaceHolderCentral$HiddenFieldQuantExpUL" id="ctl00_ContentPlaceHolderCentral_HiddenFieldQuantExpUL" value="0" /> <input type="hidden" name="ctl00$ContentPlaceHolderCentral$HiddenFieldRetour" id="ctl00_ContentPlaceHolderCentral_HiddenFieldRetour" value="0" /> </td> </tr> <tr> <td style="width: 10px; height: 59px;"></td> <td align="center" colspan="3" style="height: 59px"><!-- Table presentation -->

And as you can see you have a Table1.onclick() whereas no function is create before.

I have a lot of code around so I can not post all the page else I have to post all the website..

But it seems to be a bug in dotnet 2.0

I have search on google and found few people with the same issue, someone know more about this?

Or have a solution to this?

thanks,

I have the same problem.....

need help!!!!!!! AJAX applications are useless if very time it raises an error,isn't it?

Wednesday, March 28, 2012

tables

I have created a fully functioning website but there is one problem - it comtains 2 tables on the default page which have a gap!

I have entered padding="opx" border="0px" and it hasn't worked??

there is no <br /> between the tables or a nbsp;

help?!!

rach

Can you provide a link to your website?


Try put

cellspacing="0"cellpadding="0"border="0" into you two tables


For CSS, set the padding to 0 and the MARGIN to 0.


it's ok I have done it now! it was really basic! d'oh

Rach

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 Control

I am looking a tabs control is exactly the same as used on this forum. For example on the write a new post page, they're are tabs for compose, options, related and preview. I am looking to download a control te same as this. Anyone know where I could find it?You can download the code atCommunityServer.org.
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

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
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

Hey all,
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

Hey all,
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 WebForm

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).download the portal starter kit from www.asp.net , its got a awful lot that
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...

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 control and Form

Hi,

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 or Tab Controls

I would like to place a tab control on an ASP Web Page. I
don't see a control that I can drag from the toolbox for
either "web forms" or "html" that I can use. Does anyone
know how to do this?There isn't one out of the box. You have to a) download the IE Web Controls
from http://www.asp.net/IEWebControls/Do...index=0&tabid=1, b)
add an association to the ie web controls dll to your project, then c)
manually add the tabstrip capability to the toolbox by customizing the
toolbar to display the items from the ie web controls dll.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Natasha" <ndicocco@.nauticom.net> wrote in message
news:0b6101c36822$81e3e9c0$a001280a@.phx.gbl...
> I would like to place a tab control on an ASP Web Page. I
> don't see a control that I can drag from the toolbox for
> either "web forms" or "html" that I can use. Does anyone
> know how to do this?

tabstrip webcontrol can not work in framework 1.1

(Type your message here)
Hi all,
I've encountered a problem when opening an aspx page with a tabstrip
webcontrol on a windows 2003 server. (.net framework version 1.1).
I created the tabstrip in Windows 2000 and framework version was 1.0.3075. R
ight now it does not supported by the new version of framework. (1.1)
How should I do?
Thanks a lot!
From: Linda wu
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>4BBS4PQmuUyyL+NI63s7Lw==</Id>Hi Linda,
Since you can get the source code for the tabstrip, you may be able to
recompile it for 1.1:
http://www.asp.net/IEWebControls/Do...index=0&tabid=1
"Linda wu via .NET 247" <anonymous@.dotnet247.com> wrote in message
news:%23YPmJfVMEHA.2556@.TK2MSFTNGP10.phx.gbl...

tabstrip webcontrol can not work in framework 1.1

(Type your message here)
Hi all,

I've encountered a problem when opening an aspx page with a tabstrip
webcontrol on a windows 2003 server. (.net framework version 1.1).
I created the tabstrip in windows 2000 and framework version was 1.0.3075. Right now it does not supported by the new version of framework. (1.1)
How should I do?
Thanks a lot!

----------
From: Linda wu

--------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>4BBS4PQmuUyyL+NI63s7Lw==</Id>Hi Linda,

Since you can get the source code for the tabstrip, you may be able to
recompile it for 1.1:

http://www.asp.net/IEWebControls/Do...index=0&tabid=1

"Linda wu via .NET 247" <anonymous@.dotnet247.com> wrote in message
news:%23YPmJfVMEHA.2556@.TK2MSFTNGP10.phx.gbl...

Tabview control focus problem

Hi,

I have a yahoo tabview control with 3 tabs in my aspx page. If I am in the third tab and a control fires a postback, then I need the page to load with the third tab in focus. Instead it is showing the default first tab.

Any help is appreciated.

Thanks.

Hello,

Because we don't know how to code the third-party control, you may find some codes like this:

<script type="text/javascript">

var myTabs = new YAHOO.widget.TabView('demo', { activeIndex: 1 } ); // make tab at position 1 active

alert(myTabs.get('activeIndex')); // alerts 1

myTabs.set('activeIndex', 0); // make tab at index 0 active

alert(myTabs.get('activeIndex')); // alerts 0

</script>

Or

<li class="selected"><a href="#tab1"><em>Tab One Label</em></a></li>

As shown above, the red lines you see may help you, just change the index number you want.

There are more references for you:

A Simple TabView for Web Pages

http://www.codeproject.com/asp/TabView.asp

HTH


Hi could you let me know how to create tab forms in ASP.NET 2.0 without using any thirdparty tools...Thanks

Tag A Photo

I have a page that loads a photo based on a query string in the URL.

I am attempting to allow the uploader of the image to "tag" people in the photo. A tag will be a javascript positioned "frame" over the top of the image, the frame will only appear when the user hovers their mouse over a name of someone in that photo.

I have sorted tagging as in, the user can set people in a photo. Does anyone know any java script that will allow me to :

1) Limit the users tagging abilitys to only the photos area : "image1".

2) Will save the location (from top and left) of the frame.

I hope this makes sense. If you wish to see an example "facebook.com" already does this type of tagging. I am a bit of a newbie when it comes to javasctript so i dont really know where to start with this. If there is a way of doing this that is better than the way i am trying please let me know. thanks si!

Hi,

Take a look here

http://weblogs.asp.net/scottgu/archive/2006/07/19/Building-a-Photo-Tagging-Application-using-ASP.NET-2.0_2C00_-LINQ_2C00_-and-Atlas.aspx


thats perfect except i didnt want to use class diagrams if possible. I will give it a go and see if it works for my project. Thanks a million! si!


i feel i should explain slightly more. I want the user to be able to click "photos containing you" button and it`ll load a page which`ll filter out all images that do not have a tag of them. I was going to do this from a querystring which seems simple enough to do, but its the cloud control and storing the tags that is causing me issues. Si!

Thursday, March 22, 2012

tags not being displayed in form

I have an aspx page with a few asp textboxes + labels on it. This is fine and work as expected when displayed indipendantly. The problem is that I need to place this page into a frame. When I put it into a frame the asp textboxes and label disapear. The normal html tags I have on the page are fine. Does any one know why this happens and how to solve it

Cheers

JamieHello, all what you need is to copy your aspx files, all other folder, bin folder and place them in the main root directory of your webspace.
You can use simlpe FTP for sure, or any other procedure that is offered by the hosting company.

regards.
The aspx files are in the root directory already. We have our own intranet server here so we do the development locally. This has me well stuck. Have you got any other possible cures I am gettin bit desperate.
Post code so we can try to repro locally.
Hello, what is exactly the errors you are getting ? You asked how to move the files to a real server, and we gave the solution, what is exactly the problem now ? Explain more to be able to help you.

regards.

Take into a varible the HTML of a aspx page

Jacas,

You can use Response.Filter to do this. Here's an example:

using System;
using System.IO;

namespace cslocation
{
/// <summary>
/// Summary description for MyFilter.
/// </summary>
public class HTMLFilter : Stream
// This filter changes all characters passed through it to uppercase.
{
private Stream _sink;
private long _position;

public byte[] data;

public EmailFilter(Stream sink)
{
_sink = sink;
}

// The following members of Stream must be overriden.
public override bool CanRead
{
get { return true; }
}

public override bool CanSeek
{
get { return true; }
}

public override bool CanWrite
{
get { return true; }
}

public override long Length
{
get { return 0; }
}

public override long Position
{
get { return _position; }
set { _position = value; }
}

public override long Seek(long offset, System.IO.SeekOrigin direction)
{
return _sink.Seek(offset, direction);
}

public override void SetLength(long length)
{
_sink.SetLength(length);
}

public override void Close()
{
_sink.Close();
}

public override void Flush()
{
_sink.Flush();
}

public override int Read(byte[] buffer, int offset, int count)
{
return _sink.Read(buffer, offset, count);
}

// The Write method actually does the filtering.
public override void Write(byte[] buffer, int offset, int count)
{
data = new byte[count];
Buffer.BlockCopy(buffer, offset, data, 0, count);
_sink.Write (data, 0, count);
}

}

}

You can then instantiate this class as follows:

Response.Filter = new HTMLFilter(Response.Filter);

Hope that helps.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
jamesche@dotnet.itags.org.online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

-------
>Content-Class: urn:content-classes:message
>From: "jacas" <anonymous@dotnet.itags.org.discussions.microsoft.com>
>Sender: "jacas" <anonymous@dotnet.itags.org.discussions.microsoft.com>
>Subject: Take into a varible the HTML of a aspx page
>Date: Thu, 23 Oct 2003 09:00:01 -0700
>Lines: 7
>Message-ID: <00db01c3997e$b6ed2630$a301280a@dotnet.itags.org.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcOZfrbt/w7LUNvpQrmKlBXOan6XQg==
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:186086
>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>Somebody can expli-me how to take de the HTML of a aspx
>page into a string variable may be in de render or
>prerender event of a page
>
>thanksHy Jim,

I don't know if I don't understand but whith your code you
do a filter of the response but what I want is to take the
HTML an put it in a string varible... I do it from another
page like

you can get HtML froma a page like
mywebReq = WebRequest.Create("http://www.c-
sharpcorner.com/faq.asp")
mywebResp = mywebReq.GetResponse()
sr = New StreamReader(mywebResp.GetResponseStream,
System.Text.Encoding.ASCII)
strHTML = sr.ReadToEnd
TextBox1.Text = strHTML

but it has problems when the page is in de same directory
as de page in where de code is an in it you have to
athentificate if you want to wiev pages, but i thing it
might be a way of take that page if you are already
athentificate

i proof that
mywebReq = WebRequest.Create(site & "(" &
Request.ServerVariables("HTTP_ASPFILTERSESSIONID") & ")
page.aspx")

but d'ont works
and I thinkg there is a way for do that in the same page
that I want the HTML ...what i want is to take the
Response.content in a string variable like

str = Response.content (this is not possible but is for
expline what i want)

Thanks any way
Jacas,

I'm having a little trouble understanding exactly what you're saying, but
if I understand correctly, you want to get the HTML that is rendered by
ASP.NET and store it in a variable. If that's the case, Response.Filter is
the way to go and using the code I posted is what you want to use.

That code was originally written by one of my colleagues for a customer we
were working with who wanted to do the exact same thing you're doing. The
only difference is that our other customer was taking that HTML and
populating an e-mail message with it. You just want to store it. The end
result is the same. If you want to do it reliably, use Response.Filter.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
jamesche@.online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

-------
>Content-Class: urn:content-classes:message
>From: "jacas" <anonymous@.discussions.microsoft.com>
>Sender: "jacas" <anonymous@.discussions.microsoft.com>
>References: <00db01c3997e$b6ed2630$a301280a@.phx.gbl>
<SDvxA3YmDHA.1544@.cpmsftngxa06.phx.gbl>
>Subject: RE: Take into a varible the HTML of a aspx page
>Date: Fri, 24 Oct 2003 01:48:25 -0700
>Lines: 38
>Message-ID: <0ae701c39a0b$9627e2e0$a101280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcOaC5Yls6pRYc1aRouN+9Tsp3ecsA==
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:186270
>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>Hy Jim,
>I don't know if I don't understand but whith your code you
>do a filter of the response but what I want is to take the
>HTML an put it in a string varible... I do it from another
>page like
>you can get HtML froma a page like
> mywebReq = WebRequest.Create("http://www.c-
>sharpcorner.com/faq.asp")
> mywebResp = mywebReq.GetResponse()
> sr = New StreamReader(mywebResp.GetResponseStream,
>System.Text.Encoding.ASCII)
> strHTML = sr.ReadToEnd
> TextBox1.Text = strHTML
>but it has problems when the page is in de same directory
>as de page in where de code is an in it you have to
>athentificate if you want to wiev pages, but i thing it
>might be a way of take that page if you are already
>athentificate
>i proof that
>mywebReq = WebRequest.Create(site & "(" &
>Request.ServerVariables("HTTP_ASPFILTERSESSIONID") & ")
>page.aspx")
>but d'ont works
>and I thinkg there is a way for do that in the same page
>that I want the HTML ...what i want is to take the
>Response.content in a string variable like
>str = Response.content (this is not possible but is for
>expline what i want)
>Thanks any way
I work with VB an i translate your code

Public Class HTMLFilter
Inherits Stream
Private _sink As Stream
Private _position As Long
Public data As Byte()

Public Sub EmailFilter(ByVal sink As Stream)
_sink = sink
End Sub
Overrides ReadOnly Property CanRead() As Boolean
Get
Return True
End Get
End Property

Overrides ReadOnly Property CanSeek() As Boolean
Get
Return True
End Get
End Property

Overrides ReadOnly Property CanWrite() As Boolean
Get
Return True
End Get
End Property
Overrides ReadOnly Property Length() As Long
Get
Return 0
End Get
End Property

Overrides Property Position() As Long
Get
Return _position
End Get
Set(ByVal Value As Long)
_position = Value
End Set
End Property

Public Overrides Function Seek(ByVal offset As
Long, ByVal direction As SeekOrigin) As Long
Return _sink.Seek(offset, direction)
End Function
Public Overrides Sub SetLength(ByVal length As
Long)
_sink.SetLength(length)
End Sub
Public Overrides Sub Close()
_sink.Close()
End Sub
Public Overrides Sub Flush()
_sink.Flush()
End Sub
Public Overloads Function Read(ByVal buffer() As
Byte, ByVal offset As Int16, ByVal count As Int16) As Int16
Return _sink.Read(buffer, offset, count)
End Function
Public Overloads Function Write(ByVal buffer() As
Byte, ByVal offset As Int16, ByVal count As Int16)
ReDim data(count)
System.Buffer.BlockCopy(buffer, offset, data,
0, count)
_sink.Write(data, 0, count)
End Function
End Class

but intelligence says to me that the class HTMLFilter must
either be declared 'MustInherit' or override the following
inherited 'MustOverride' members: Public Overridable
MustOverride Overloads Sub Write(buffer() As Byte, offset
As Integer, count As Integer), Public Overridable
MustOverride Overloads Function Read(buffer() As Byte,
offset As Integer, count As Integer) As Integer

but if I understand i do it... please if you can help me...
and if i understand the page is in de accesible punblic
data that is a byte() , sorry if it is very simple but how
i take it in a varible string , you say to instantiate the
class
Response.Filter= new HTMLFilter(Response.filter)

but how i can take the HTML in string (sorry because is
posible that i don't be a very good student) ;-)

Xavi
Xavi,

I can provide you with the sample, but if you need assistance in reworking
it for your application, you would need to open a case with us. That kind
of work goes beyond what we can do in the newsgroups.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
jamesche@.online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

-------
>Content-Class: urn:content-classes:message
>From: <anonymous@.discussions.microsoft.com>
>Sender: <anonymous@.discussions.microsoft.com>
>References: <00db01c3997e$b6ed2630$a301280a@.phx.gbl>
<SDvxA3YmDHA.1544@.cpmsftngxa06.phx.gbl>
<0ae701c39a0b$9627e2e0$a101280a@.phx.gbl>
<VFH0lAkmDHA.1772@.cpmsftngxa06.phx.gbl>
>Subject: RE: Take into a varible the HTML of a aspx page
>Date: Mon, 27 Oct 2003 10:52:48 -0800
>Lines: 89
>Message-ID: <026201c39cbb$83f450b0$a301280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcOcu4P0bnCG4ILqTTeyjwHdVOkP5A==
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:186784
>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>I work with VB an i translate your code
>Public Class HTMLFilter
> Inherits Stream
> Private _sink As Stream
> Private _position As Long
> Public data As Byte()
> Public Sub EmailFilter(ByVal sink As Stream)
> _sink = sink
> End Sub
> Overrides ReadOnly Property CanRead() As Boolean
> Get
> Return True
> End Get
> End Property
> Overrides ReadOnly Property CanSeek() As Boolean
> Get
> Return True
> End Get
> End Property
> Overrides ReadOnly Property CanWrite() As Boolean
> Get
> Return True
> End Get
> End Property
> Overrides ReadOnly Property Length() As Long
> Get
> Return 0
> End Get
> End Property
> Overrides Property Position() As Long
> Get
> Return _position
> End Get
> Set(ByVal Value As Long)
> _position = Value
> End Set
> End Property
> Public Overrides Function Seek(ByVal offset As
>Long, ByVal direction As SeekOrigin) As Long
> Return _sink.Seek(offset, direction)
> End Function
> Public Overrides Sub SetLength(ByVal length As
>Long)
> _sink.SetLength(length)
> End Sub
> Public Overrides Sub Close()
> _sink.Close()
> End Sub
> Public Overrides Sub Flush()
> _sink.Flush()
> End Sub
> Public Overloads Function Read(ByVal buffer() As
>Byte, ByVal offset As Int16, ByVal count As Int16) As Int16
> Return _sink.Read(buffer, offset, count)
> End Function
> Public Overloads Function Write(ByVal buffer() As
>Byte, ByVal offset As Int16, ByVal count As Int16)
> ReDim data(count)
> System.Buffer.BlockCopy(buffer, offset, data,
>0, count)
> _sink.Write(data, 0, count)
> End Function
> End Class
>but intelligence says to me that the class HTMLFilter must
>either be declared 'MustInherit' or override the following
>inherited 'MustOverride' members: Public Overridable
>MustOverride Overloads Sub Write(buffer() As Byte, offset
>As Integer, count As Integer), Public Overridable
>MustOverride Overloads Function Read(buffer() As Byte,
>offset As Integer, count As Integer) As Integer
>but if I understand i do it... please if you can help me...
>and if i understand the page is in de accesible punblic
>data that is a byte() , sorry if it is very simple but how
>i take it in a varible string , you say to instantiate the
>class
>Response.Filter= new HTMLFilter(Response.filter)
>but how i can take the HTML in string (sorry because is
>posible that i don't be a very good student) ;-)
>Xavi