Saturday, March 31, 2012
table sizing
I have inserted a table on the webForm via the HTML tool box, the one under components, and I can not create the 4x2 table. Each time I change the Rows to 4, it keeps getting changed back to 2 when I apply the change.
Why?Vs 03 is notorious for screwing up html code.
Best bet do this:
<table>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</table>
Alternativly i think theres an insert table command on the menu for vs03, which should let you specify 4x2 and insert you a new table.
Or if the book is working from Web Matrix then maybe you should too, after all its a free download from this site :)
Hope this helps,
Andrew
You may be better off using the web form table, not the one on the html portion of the toolbox.
Use the table menu in the top menu bar.
Zath
Thanks, I am learning quickly the quirks of VS.
Thanks.
Table Web Control
I've completed the table on load, and all of the checkbox controls load up as expected, however I now need to submit any changes based on the users values. I've been googling for a good article on the Table web control but haven't found anything that will help. Does anyone know of any articles, or have sample code for maintaining state of these controls and iterating through them so I can create my dynamic SQL based on selections?
Thanks.From the SDK:
"Note: Programmatic additions or modifications to a table row or cell will not persist across posts to the server. Table rows and cells are controls of their own, not properties of the Table control. Changes to table rows or cells must be reconstructed after each post to the server."
Ok, so I think that answers my viewstate problem. I DO recreate this table on page load everytime, so I don't think I need to worry about that.
Any help on muddling through the selected checkboxes of a dynamically created table web control, would still be very beneficial to my cause.
Ugh, I'm fried here...
The viewstate will STILL be a problem, because I wasn't thinking that with each postback, my table would just be re-created, therefore I won't get the modified values on submission.
I keep talking to myself but oh well...
Just to reiterate, I need help on maintaing state for a dynamically created table web control, and how to iterate through the controls that were created in that table on postback.
Dear Forum,
Hi! It's me again!
Ok, so after a little more research I found that people are suggesting the Request.Form() to collect information about the controls. Does that sound right? I guess if you can't take advantage of viewstate in this situation, then Request.Form() is the way to go.
Taking that into consideration, I don't think I can really "iterate" through the controls in my dynamic table, but maybe create some variables that will hold the number of checkbox controls say, when I create the table. So maybe it would look something like this:
pseudocode -
' Creating the table
Dim cb as CheckBox
Dim cbCounter as Int32
'Dynamically create checkbox here and increment the checkbox counter
Then later when I retireve the values within my table...
'Go through each of the checkboxes and determine the value
for x=0 to cbCounter.Length - 1
'check the value of checkbox "x" here
Does this sound like a logical resolution? Am I taking this too far and there is an easier path that I'm missing here? Does anyone really care at this point? :)
Hi FrankWhite,
I'm having the same problem here. I'm fetching values from a MySQL database, I show them in a nice table with checkboxes. But when the user clicks "submit" my checkboxes are lost (since my table won't keep them).
So I'm looking for the same solution: how can I keep all generated checkboxes, so I can check which of them are checked by the user?
If someone has experience with this scenario and knows how it can be done, please post it here for me and FrankWhite ;)
Thanks in advance!
1. Try to stay away from dynamically creating controls that need to keep their values during postbacks.
2. Modify the way you search for information. More than 50% of programming involves just trying to find out how to do stuff. Your problem is not with viewstate, but with the ASP.NET lifecycle.
To answer both your question, you will need some patients.This article will answer your questions, but you have to read every word carefully. DONT skip to the end and read the conclusion as you will miss out on important things that you should learn.
Jagdip
(Haven't read the article yet)
I did come to a solution the other day. Basically on Page_Load my table is recreated everytime. When the submit button is pressed, I simply do Request.Form() on the checkbox controls. I don't have the code in front of me at the moment, but I basically did the following to solve my problem.
1.) Created a variable that would serve as a counter for my checkboxes.
2.) When the checkbox was created, I would give it the id: "chk_" & chkCtrls (variable that was the counter)
3.) In the btn_submit() I created a loop to iterate through each of the checkbox controls (well not really the controls, rather the # of controls). In the loop I would check if the checkbox was checked and do something according to that:
for x = 0 to chkCtrls
if Request.Form("chk_" & x) = "On" Then
'do something
end if
next
There was a lot more to it then this for my situation, but I think this will give you a good idea. Let me know if this helps, or if you figured out a different solution. In the meantime, I'll need to peep this article...
I used the same solution, I recreated my checkbox collection each time in Page_load, and used Request.Form to check wether the "check all" was checked or unchecked to set a default checked value on each checkbox (true/false). Then on the submit button I used Request.Form again to check the status of each generated checkbox by checking for controls like "chk" + intID.
This does the trick I needed very well.
I'll take a look at the article as well, in case this is not the right way of programming this :)
Thanks for the help,
Speerman
Alright, alright, I'll give you the jist of it. I'm not an expert in this (just been reading around a lot) so here goes.
Basically, the ASP.NET life cylce loads your info like this:
Page_Init
Load ViewState
Page_Load
Run any controls functions (e.g. button_click functions, etc.)
From this you can see that if you create controls dynamically, then they will be displayed on the page; but their viewstate will not be 'loaded'. What we need is a way to create the controls before the Load Viewstate state.
Solution: If you are using VS, the you know there is a region called " Web Form Designer Generated Code ". In this you will find:
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
All you need to do is call the function that creates the dynamic controls from within the Page_Init function. That's it (i think - havent got a chance to try it).
But please, read the article. You will have a better understanding of ASP.NET which means better pages (and maybe a pay rise - you can tell why I read the aticles ;-)
HTH
Jagdip
Table. Look Everywhere. Please help me out.
Hello,
I need to create a Table at runtime and I need the TBody tag to be:
<tbody id="itemContainer" runat="server"></tbody>
I need to to define its ID and making it run at server.
I tried everthing I could think of.
How can I do this?
Thanks,
Miguel
you can use a placeholder and do a placeholder.controls.add(pass the tablehere, table is your server object)
You didn't understand. I have no problems in working at runtime.
I create everything at runtime. The problem is that I can't find a property/way to define the ID of a Table's TBody tag when created at runtime.
Thanks,
Miguel
Hi Miguel,
Based on my understanding, you want to add the table in your asp.net application dynamically. If I have misunderstood you, please feel free to let me know.
The tbody is the html control. We can add the server table dynamically. For example,
Table t = new Table();
t.ID = "t";
TableHeaderRow hr = new TableHeaderRow();
hr.ID = "hr";
t.Controls.Add(hr);
TableCell tc = new TableCell();
tc.ID = "tc";
hr.Controls.Add(tc);
tc.Text = "test";
form1.Controls.Add(t);
I hope this helps.
publicvoid CreateEmployeeList()
{
System.Web.UI.WebControls.Table Tab =new System.Web.UI.WebControls.Table();
Tab.BorderWidth =newUnit(3);
Tab.BorderColor = System.Drawing.Color.AliceBlue;
Tab.CellPadding = 1;
//Tab.CellSpacing = 1;
TableRow Tr =newTableRow();
TableCell Tc1 =newTableCell();
TableCell Tc2 =newTableCell();
TableCell Tc3 =newTableCell();
TableCell Tc4 =newTableCell();
Label label4 =newLabel();
label4.ID ="label4";
label4.Text ="Employee ID";
Tc4.Controls.Add(label4);
Tr.Cells.Add(Tc4);
Label label1 =newLabel();
label1.ID ="label1";
label1.Text ="Employee";
Tc1.Controls.Add(label1);
Tr.Cells.Add(Tc1);
Label label2 =newLabel();
label2.ID ="label2";
label2.Text ="Attendance";
Tc2.Controls.Add(label2);
Tr.Cells.Add(Tc2);
Label label3 =newLabel();
label3.ID ="label3";
label3.Text ="Remark";
Tc3.Controls.Add(label3);
Tr.Cells.Add(Tc3);
Tab.Rows.Add(Tr);
Tr.BackColor = System.Drawing.Color.AliceBlue;
EmployeeList =EmployeeReg.SelectStaff();
EmployeeReg empreg;
EmployeeNo = EmployeeList.Count;
Empid =newLabel[EmployeeList.Count];
Empname =newLabel[EmployeeList.Count];
Attendance =newRadioButtonList[EmployeeList.Count];
Remark =newTextBox[EmployeeList.Count];
for (int i = 0; i < EmployeeList.Count; i++)
{
empreg =newEmployeeReg();
empreg = EmployeeList[i];
//initialize table row
Tr =newTableRow();
//initialize columns in particular row
Tc1 =newTableCell();
Tc2 =newTableCell();
Tc3 =newTableCell();
Tc4 =newTableCell();
//Generating Employee ID in table.
Label Lbl2 =newLabel();
Lbl2.ID ="lblEmpid" + i.ToString();
Lbl2.BackColor= System.Drawing.Color.AliceBlue;
Lbl2.Text = empreg.EmployeeID.ToString();
Empid[i] = Lbl2;
Tc4.Controls.Add(Lbl2);
Tr.Cells.Add(Tc4);
//Generating Employee name in table.
Label Lbl1 =newLabel();
Lbl1.ID ="lblName" + i.ToString();
Lbl1.Text = empreg.EmployeeName.ToString();
Empname[i] = Lbl1;
Tc1.Controls.Add(Lbl1);
Tr.Cells.Add(Tc1);
//Genertaing radiobuttonlist for attendance
RadioButtonList rdbl =newRadioButtonList();
rdbl.ID ="rdblAtt" + i.ToString();
rdbl.RepeatDirection =RepeatDirection.Horizontal;
ListItem item1 =newListItem();
//item1.Text = "Present";
item1.Value ="P";
item1.Selected =true;
rdbl.Items.Add(item1);
ListItem item2 =newListItem();
// item2.Text = "Absent";
item2.Value ="A";
rdbl.Items.Add(item2);
ListItem item3 =newListItem();
// item3.Text = "Off Day";
item3.Value ="O";
rdbl.Items.Add(item3);
ListItem item4 =newListItem();
// item4.Text = "Half Day";
item4.Value ="H";
rdbl.Items.Add(item4);
Attendance[i] = rdbl;
Tc2.Controls.Add(rdbl);
Tr.Cells.Add(Tc2);
//Genertaing TextBox for Remark
TextBox Txt1 =newTextBox();
// Txt1.ID = "txtRemark" + i.ToString();
Remark[i] = Txt1;
Remark[i].ID ="txtRemark" + i.ToString();
Remark[i].Text ="";
Tc3.Controls.Add(Txt1);
Tr.Cells.Add(Tc3);
Tab.Rows.Add(Tr);
}
this.Panel1.Controls.Add(Tab);
}
TableAdapter Insert (Primary Key)
Hi
I have just started to learn ASP.Net. However I have some experience with ASP.
Anyway I have created a asp-form which should create a new entry in the database after you have clicked the submit button.
I created a tableadapter and following simple code:tbUsersTableAdapter topAdapter=new tbUsersTableAdapter();
topAdapter.InsertUser(DateTime.Now, DateTime.Now, DateTime.Now,true,false, txtNickname.Text, 2, txtEMail.Text, txtPassword.Text,"");
Here is the SQl Command without the primary key:INSERTINTO[tbUsers] ([CDate], [MDate], [ADate], [Active], [Activated],[Nickname], [Role],, [Password],
[IP])VALUES (@dotnet.itags.org.CDate, @dotnet.itags.org.MDate, @dotnet.itags.org.ADate, @dotnet.itags.org.Active, @dotnet.itags.org.Activated, @dotnet.itags.org.Nickname, @dotnet.itags.org.Role, @dotnet.itags.org.eMail, @dotnet.itags.org.Password, @dotnet.itags.org.IP)
This works fine as long as I put the ID (Primary Key) into the Insert command. But I don't know how I can find out the next avaiable primary key. I have thought it would be automatically incremented. Anyway I went to the properties of the tableadapter and there was a property which I switched on for my primary key field "AutoIncrement". However it still doesn't work.
Before I used to work with MS Access and OleDB Connection. There I just skipped the Primary Key Value and it has been created automatically. Here I get an error message that the primary key can't be null.
I hope somebody could help me with that or has an idea what I'm doing wrong.
thx
Hi
I searched and tried out a lot of things. Finally I found the problem today. I had to open the table with the Server Explorer. Actually I set my ID field to Primary Key but I forgot to set the Identity Column. After I set the Identity Column to my ID field it worked... great;-)))) Now I can just add a new record with skipping the Primary Key and it will be generated automatically.
thx all
TableAdapter: How do I create one which inserts values from a form into two tables?
to provide information regarding themselves and also the booking
detail. I want to send the data into two tables. One, the personalinfo
table and another bookinginfo. The bookinginfo, also has a column for
personalID which links it to the personalInfo table. How can I do this
with eiter an ASP button control use a table adapter to do it.
Sorry if this sounds trivial but I am really new to ASP and SQL.
RegardsYou'd need to simply write the data out to the table. Have a look at the
connection objects in .NET there is actually a lot of code that already does
what you want posted all over the web.
Regards,
Alvin Bruney
---
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Fendi Baba" <effendi@.epitome.com.sg> wrote in message
news:1171175411.943113.134530@.h3g2000cwc.googlegroups.com...
>I am creating a simple booking system. The system requires the users
> to provide information regarding themselves and also the booking
> detail. I want to send the data into two tables. One, the personalinfo
> table and another bookinginfo. The bookinginfo, also has a column for
> personalID which links it to the personalInfo table. How can I do this
> with eiter an ASP button control use a table adapter to do it.
> Sorry if this sounds trivial but I am really new to ASP and SQL.
> Regards
>
TableAdapter: How do I create one which inserts values from a form into two tables?
to provide information regarding themselves and also the booking
detail. I want to send the data into two tables. One, the personalinfo
table and another bookinginfo. The bookinginfo, also has a column for
personalID which links it to the personalInfo table. How can I do this
with eiter an ASP button control use a table adapter to do it.
Sorry if this sounds trivial but I am really new to ASP and SQL.
RegardsYou'd need to simply write the data out to the table. Have a look at the
connection objects in .NET there is actually a lot of code that already does
what you want posted all over the web.
--
Regards,
Alvin Bruney
----------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Fendi Baba" <effendi@.epitome.com.sgwrote in message
news:1171175411.943113.134530@.h3g2000cwc.googlegro ups.com...
Quote:
Originally Posted by
>I am creating a simple booking system. The system requires the users
to provide information regarding themselves and also the booking
detail. I want to send the data into two tables. One, the personalinfo
table and another bookinginfo. The bookinginfo, also has a column for
personalID which links it to the personalInfo table. How can I do this
with eiter an ASP button control use a table adapter to do it.
>
Sorry if this sounds trivial but I am really new to ASP and SQL.
>
Regards
>
Wednesday, March 28, 2012
TableAdaptor Update Access database
or
I have a typed dataset named dsUserInfo
I have a tableadaptor named taFillUserInfo
I would like to on the vb side be able to do update the database when a
button is clicked executing the following code.
if me.textbox1.text = "x" then
taFillUserInfo.text1 = me.textbox1
else
some message
End if
What I can't get is how to "call" my tableadaptor taFillUserInfo to get the
column names.Ysgrifennodd Andre:
> I used the wizard in VS2005 to create my connection, dataset, and tableada
ptor
> I have a typed dataset named dsUserInfo
> I have a tableadaptor named taFillUserInfo
> I would like to on the vb side be able to do update the database when a
> button is clicked executing the following code.
> if me.textbox1.text = "x" then
> taFillUserInfo.text1 = me.textbox1
> else
> some message
> End if
> What I can't get is how to "call" my tableadaptor taFillUserInfo to get th
e
> column names.
>
I can't remember if this answers your question directly, but it should help:
http://www.peredur.uklinux.net/TypedDataSets.pdf
This example project (which is really about forms authentication), uses
a Typed DataSet. It definitely shows you how to use the Typed DataSet
using the column names:
http://www.peredur.uklinux.net/Form...ticationSln.zip
Note that the zip file contains a complete .NET solution. I cannot
guarantee that it is virus-free. I think it is; but I can't guarantee
it. So please examine the code and recompile it before running it.
Both the above use C# rather than VB, but I don't think that should give
you too much trouble. It might even persuade you to use C# :)
HTH
Peter
TableAdaptor Update Access database
I have a typed dataset named dsUserInfo
I have a tableadaptor named taFillUserInfo
I would like to on the vb side be able to do update the database when a
button is clicked executing the following code.
if me.textbox1.text = "x" then
taFillUserInfo.text1 = me.textbox1
else
some message
End if
What I can't get is how to "call" my tableadaptor taFillUserInfo to get the
column names.Ysgrifennodd Andre:
Quote:
Originally Posted by
I used the wizard in VS2005 to create my connection, dataset, and tableadaptor
>
I have a typed dataset named dsUserInfo
I have a tableadaptor named taFillUserInfo
>
I would like to on the vb side be able to do update the database when a
button is clicked executing the following code.
>
if me.textbox1.text = "x" then
taFillUserInfo.text1 = me.textbox1
else
some message
End if
>
What I can't get is how to "call" my tableadaptor taFillUserInfo to get the
column names.
>
>
I can't remember if this answers your question directly, but it should help:
http://www.peredur.uklinux.net/TypedDataSets.pdf
This example project (which is really about forms authentication), uses
a Typed DataSet. It definitely shows you how to use the Typed DataSet
using the column names:
http://www.peredur.uklinux.net/Form...ticationSln.zip
Note that the zip file contains a complete .NET solution. I cannot
guarantee that it is virus-free. I think it is; but I can't guarantee
it. So please examine the code and recompile it before running it.
Both the above use C# rather than VB, but I don't think that should give
you too much trouble. It might even persuade you to use C# :)
HTH
Peter
TableCell
TableCell cell = new TableCell()
but I could not find how to add a TextBox inside this cell. Any ideas?
Thanks in advance
Serdar KALAYCI
--WebControls.TextBox txt = new WebControls.TextBox();
cell.Controls.Add(txt);
Karl
"Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
news:ewP%23cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> I create a TableCell by
> TableCell cell = new TableCell()
> but I could not find how to add a TextBox inside this cell. Any ideas?
> Thanks in advance
> Serdar KALAYCI
> --
Got it, here's the code if anyone wonders...
TableCell cell = new TableCell();
TextBox text1 = new TextBox();
cell.Controls.Add (text1);
"Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
news:ewP#cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> I create a TableCell by
> TableCell cell = new TableCell()
> but I could not find how to add a TextBox inside this cell. Any ideas?
> Thanks in advance
> Serdar KALAYCI
> --
I have one more question. I added a Button inside a Table at design time by
changing HTML codes, but I can't access it's events or even see it in the
components list on the Properties window.
Serdar KALAYCI
"Karl Seguin" <kseguin##crea.ca> wrote in message
news:uO53SbwPDHA.1608@.TK2MSFTNGP11.phx.gbl...
> WebControls.TextBox txt = new WebControls.TextBox();
> cell.Controls.Add(txt);
> Karl
>
> "Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
> news:ewP%23cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> > I create a TableCell by
> > TableCell cell = new TableCell()
> > but I could not find how to add a TextBox inside this cell. Any ideas?
> > Thanks in advance
> > Serdar KALAYCI
> > --
if you are adding an object programatically, like your butotn, you'll also
have to attach the event programatically.
in vb.net, you can use:
addhandler yourButton.click, AddressOf yourFunctionHandler
in c#, you can use:
yourButton.Click += new EventHandler(yourFunctionHandler);
Make sure that your button is created, and you attach your handler on
postback also (ie, don't wrap it in an !page.IsPostback)
Karl
"Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
news:ulgu2oxPDHA.1748@.TK2MSFTNGP11.phx.gbl...
> I have one more question. I added a Button inside a Table at design time
by
> changing HTML codes, but I can't access it's events or even see it in the
> components list on the Properties window.
> Serdar KALAYCI
>
> "Karl Seguin" <kseguin##crea.ca> wrote in message
> news:uO53SbwPDHA.1608@.TK2MSFTNGP11.phx.gbl...
> > WebControls.TextBox txt = new WebControls.TextBox();
> > cell.Controls.Add(txt);
> > Karl
> > "Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
> > news:ewP%23cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> > > I create a TableCell by
> > > > TableCell cell = new TableCell()
> > > > but I could not find how to add a TextBox inside this cell. Any ideas?
> > > > Thanks in advance
> > > Serdar KALAYCI
> > > --
> > >
TableLayoutPanel Control
Hi!
I am trying to create an Excel-like table in Visual Basic 2005 / Visual C# 2005 EE.
I use TableLayoutPanel control to present the data.
However, I found out that this table layout is not very efficient, like: I can't draw the border for specific cell, nor can I resize one cell to be bigger than others.
Is there a way to do this? Or maybe there is a better way to create an Excel-like table?
Many thanks in advanced!!!!
Hi,
Is this a web control??
Actually, I use Visual Basic 2005 EE for Windows Form. I don't know if VWD 2005 EE has the same control or not.
I am trying to build an application that run in Windows OS. The application will need this Excel-like table layout.
Thanks for you help and time, really appreciated that.
Can somebody help me please?
Many thanks in advanced!
Tables and CSS
Not sure if this is the right forum for this, but here goes:
I'm using VS.NET 2003 to create a Web app and have defined a table as
follows:
<table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
width="100%">
As I'm going to be reusing this style all over the app, I'm trying to
replace it with a style, as follows:
<table class=tblBorder>
and in my stylesheet I have the following definition:
.tblBorder
{
border-style: outset;
border-bottom-color: "#006699";
border-right-color: "#006699";
border-left-color: "lightgrey";
border-top-color: "lightgrey";
border-width: 3;
}
But it doesn't look right. I'm obviously missing something...
Any assistance gratefully received.
Mark RaeHi Mark,
You aren't missing anything. The bordercolorlight and bordercolordark are
rendered differently than CSS styles are so things may not look the same
when applied differently. Also, border in the <table> tag is expressed
differently than border-width is in CSS (border-width in CSS can take
different measurement units including pt, px, em, etc). You will have to toy
around with your CSS settings to get them closer to what the browser
actually renders if those values were supplied in the tag.
HTH
Kyril Magnos
Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
| Hi,
|
| Not sure if this is the right forum for this, but here goes:
|
| I'm using VS.NET 2003 to create a Web app and have defined a table as
| follows:
|
| <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
| width="100%">
|
| As I'm going to be reusing this style all over the app, I'm trying to
| replace it with a style, as follows:
|
| <table class=tblBorder>
|
| and in my stylesheet I have the following definition:
|
| .tblBorder
| {
| border-style: outset;
| border-bottom-color: "#006699";
| border-right-color: "#006699";
| border-left-color: "lightgrey";
| border-top-color: "lightgrey";
| border-width: 3;
| }
|
| But it doesn't look right. I'm obviously missing something...
|
| Any assistance gratefully received.
|
| Mark Rae
|
|
"Kyril Magnos" <kyril.magnos@.yahoo.com> wrote in message
news:eHTGrL3aEHA.4048@.TK2MSFTNGP10.phx.gbl...
> Hi Mark,
> You aren't missing anything. The bordercolorlight and bordercolordark are
> rendered differently than CSS styles are so things may not look the same
> when applied differently. Also, border in the <table> tag is expressed
> differently than border-width is in CSS (border-width in CSS can take
> different measurement units including pt, px, em, etc). You will have to
toy
> around with your CSS settings to get them closer to what the browser
> actually renders if those values were supplied in the tag.
OK - thanks for the reply.
Check out
http://www.somacon.com/color/html_c...rder_styles.php
Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Not sure if this is the right forum for this, but here goes:
> I'm using VS.NET 2003 to create a Web app and have defined a table as
> follows:
> <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
> width="100%">
> As I'm going to be reusing this style all over the app, I'm trying to
> replace it with a style, as follows:
> <table class=tblBorder>
> and in my stylesheet I have the following definition:
> .tblBorder
> {
> border-style: outset;
> border-bottom-color: "#006699";
> border-right-color: "#006699";
> border-left-color: "lightgrey";
> border-top-color: "lightgrey";
> border-width: 3;
> }
> But it doesn't look right. I'm obviously missing something...
> Any assistance gratefully received.
> Mark Rae
>
"Alphonse Giambrone" <NOSPAMa-giam@.example.invalid> wrote in message
news:emevqZ4aEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Check out
> http://www.somacon.com/color/html_c...rder_styles.php
A useful link - thanks very much.
Tables and CSS
Not sure if this is the right forum for this, but here goes:
I'm using VS.NET 2003 to create a Web app and have defined a table as
follows:
<table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
width="100%"
As I'm going to be reusing this style all over the app, I'm trying to
replace it with a style, as follows:
<table class=tblBorder
and in my stylesheet I have the following definition:
..tblBorder
{
border-style: outset;
border-bottom-color: "#006699";
border-right-color: "#006699";
border-left-color: "lightgrey";
border-top-color: "lightgrey";
border-width: 3;
}
But it doesn't look right. I'm obviously missing something...
Any assistance gratefully received.
Mark RaeHi Mark,
You aren't missing anything. The bordercolorlight and bordercolordark are
rendered differently than CSS styles are so things may not look the same
when applied differently. Also, border in the <table> tag is expressed
differently than border-width is in CSS (border-width in CSS can take
different measurement units including pt, px, em, etc). You will have to toy
around with your CSS settings to get them closer to what the browser
actually renders if those values were supplied in the tag.
--
HTH
Kyril Magnos
Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
| Hi,
|
| Not sure if this is the right forum for this, but here goes:
|
| I'm using VS.NET 2003 to create a Web app and have defined a table as
| follows:
|
| <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
| width="100%">
|
| As I'm going to be reusing this style all over the app, I'm trying to
| replace it with a style, as follows:
|
| <table class=tblBorder>
|
| and in my stylesheet I have the following definition:
|
| .tblBorder
| {
| border-style: outset;
| border-bottom-color: "#006699";
| border-right-color: "#006699";
| border-left-color: "lightgrey";
| border-top-color: "lightgrey";
| border-width: 3;
| }
|
| But it doesn't look right. I'm obviously missing something...
|
| Any assistance gratefully received.
|
| Mark Rae
|
|
"Kyril Magnos" <kyril.magnos@.yahoo.com> wrote in message
news:eHTGrL3aEHA.4048@.TK2MSFTNGP10.phx.gbl...
> Hi Mark,
> You aren't missing anything. The bordercolorlight and bordercolordark are
> rendered differently than CSS styles are so things may not look the same
> when applied differently. Also, border in the <table> tag is expressed
> differently than border-width is in CSS (border-width in CSS can take
> different measurement units including pt, px, em, etc). You will have to
toy
> around with your CSS settings to get them closer to what the browser
> actually renders if those values were supplied in the tag.
OK - thanks for the reply.
Check out
http://www.somacon.com/color/html_c...rder_styles.php
--
Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Not sure if this is the right forum for this, but here goes:
> I'm using VS.NET 2003 to create a Web app and have defined a table as
> follows:
> <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
> width="100%">
> As I'm going to be reusing this style all over the app, I'm trying to
> replace it with a style, as follows:
> <table class=tblBorder>
> and in my stylesheet I have the following definition:
> .tblBorder
> {
> border-style: outset;
> border-bottom-color: "#006699";
> border-right-color: "#006699";
> border-left-color: "lightgrey";
> border-top-color: "lightgrey";
> border-width: 3;
> }
> But it doesn't look right. I'm obviously missing something...
> Any assistance gratefully received.
> Mark Rae
"Alphonse Giambrone" <NOSPAMa-giam@.example.invalid> wrote in message
news:emevqZ4aEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Check out
> http://www.somacon.com/color/html_c...rder_styles.php
A useful link - thanks very much.
Tables automatically resizes
The problem I have is that I create the outer table and set the size
properties to what I want them to be, then, if I put another table
into the first cell, when I resize that nested table, it automatically
resizes the other cells also. If I do the same type of thing in
Dreamweaver, this doesn't happen. Is there a setting of some sort in
..NET that I can turn off to prevent this from happening?
Here is the html code for the table. Sorry about the formatting.
It is the tblMenuBar table, that when I resize it, vertically, resizes
the other cells in the outer table.
<body class="BasePage" bottomMargin="0" leftMargin="0" topMargin="0"
rightMargin="0">
<form id="frmLogin" method="post" runat="server">
<TABLE id="tblBase" height="100%" cellSpacing="0" cols="4"
cellPadding="0" width="1000" border="0">
<TR>
<TD class="MenuBar" width="177" rowSpan="3">
<TABLE id="tblMenuBar" height="100%" cellSpacing="1"
cellPadding="1" width="177" border="1">
<TR>
<TD height="50" width="100%">
<asp:HyperLink id="HyperLink1"
runat="server">HyperLink</asp:HyperLink></TD>
</TR>
</TABLE>
</TD>
<td class="FormSpacer" width="22" bgColor="#ffffff"
rowSpan="3"></td>
<td class="PageHeader" vAlign="top" align="middle" width="601"
style="HEIGHT: 0.64in">
<uc1:pageheader id="PageHeader" runat="server"></uc1:pageheader>
</td>
<td class="FormSpacer" width="200" rowSpan="3"></td>
</TR>
<TR>
<TD class="WorkSpace" vAlign="top">
<div align="center">
<asp:hyperlink id="hplSecureSession" runat="server"
NavigateUrl="https://statslink.streck.com/">Click here for SECURE
INTERNET SESSION</asp:hyperlink>
</div>
<DIV align="center" class="WorkSpace" noWrap>
</DIV>
</TD>
</TR>
<TR>
<td class="PageFooter" height="50">
<uc1:pagefooter id="PageFooter" runat="server"></uc1:pagefooter>
</td>
</TR>
</TABLE>
</form>
</body
Thank you!
KalvinGive tblBase a specific height of 50.
Give tblMenuBar a specific height of 50, as well as the first cell in the
first row of tblMenuBar; give it a height of 50 too.
In fact, for anything that shouldn't be taller than 50 pixels, give anything
involved in it a hard-coded height of 50.
Avoid putting anything taller than 50 pixes in the cells of tblMenuBar.
This may or may not fix your problem, but it's good practice to be very
specific with tables when you need them to behave in a precise manner.
"Kalvin" <ktuel@.streck.com> wrote in message
news:879688dc.0308081113.2fa335b3@.posting.google.c om...
> I am using a nested table to control different elements of my layout.
> The problem I have is that I create the outer table and set the size
> properties to what I want them to be, then, if I put another table
> into the first cell, when I resize that nested table, it automatically
> resizes the other cells also. If I do the same type of thing in
> Dreamweaver, this doesn't happen. Is there a setting of some sort in
> .NET that I can turn off to prevent this from happening?
> Here is the html code for the table. Sorry about the formatting.
> It is the tblMenuBar table, that when I resize it, vertically, resizes
> the other cells in the outer table.
>
> <body class="BasePage" bottomMargin="0" leftMargin="0" topMargin="0"
> rightMargin="0">
> <form id="frmLogin" method="post" runat="server">
> <TABLE id="tblBase" height="100%" cellSpacing="0" cols="4"
> cellPadding="0" width="1000" border="0">
> <TR>
> <TD class="MenuBar" width="177" rowSpan="3">
> <TABLE id="tblMenuBar" height="100%" cellSpacing="1"
> cellPadding="1" width="177" border="1">
> <TR>
> <TD height="50" width="100%">
> <asp:HyperLink id="HyperLink1"
> runat="server">HyperLink</asp:HyperLink></TD>
> </TR>
> </TABLE>
> </TD>
> <td class="FormSpacer" width="22" bgColor="#ffffff"
> rowSpan="3"></td>
> <td class="PageHeader" vAlign="top" align="middle" width="601"
> style="HEIGHT: 0.64in">
> <uc1:pageheader id="PageHeader" runat="server"></uc1:pageheader>
> </td>
> <td class="FormSpacer" width="200" rowSpan="3"></td>
> </TR>
> <TR>
> <TD class="WorkSpace" vAlign="top">
> <div align="center">
> <asp:hyperlink id="hplSecureSession" runat="server"
> NavigateUrl="https://statslink.streck.com/">Click here for SECURE
> INTERNET SESSION</asp:hyperlink>
> </div>
> <DIV align="center" class="WorkSpace" noWrap>
> </DIV>
> </TD>
> </TR>
> <TR>
> <td class="PageFooter" height="50">
> <uc1:pagefooter id="PageFooter" runat="server"></uc1:pagefooter>
> </td>
> </TR>
> </TABLE>
> </form>
> </body>
> Thank you!
> Kalvin
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
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 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 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.
TabStrip
I am wanting to create my own TabStrip control, similar to the one that this site uses. The only problem is that I cannot find any tutorials/examples in vb.Net. Can someone help me out?
Thanks, OGHSGo there:http://www.asp.net/IEWebControls/Download.aspx?tabindex=0&tabid=1
Saturday, March 24, 2012
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!