|
Sorted, you're right, that rocks!
I hope you're recovering from your beating
A mum and loving it!
|
|
|
|
|
Shog9 wrote: Megan Forbes wrote:
padding: 0;
Should add UOM to this as well (0px).
After the value zero, the unit identifier is optional.
I always omit the unit when the value is zero. A unit after a zero value doesn't convey any information as the value is the same regardless of the unit, and I find it easier to read the code without it.
Compare:
padding: 0px 0px 9px 0px;
to:
padding: 0 0 9px 0;
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: A unit after a zero value doesn't convey any information as the value is the same regardless of the unit, and I find it easier to read the code without it.
True 'nuff. I guess i just got in the habit of always including a unit after a value and stopped thinking about it.
|
|
|
|
|
I could be wrong but I'm incline to say that it is not optional if you want your page to pass W3C compliance test or if you want to assign your document a doctype of Strict or Transitional.
-Richard
|
|
|
|
|
Actually, you are wrong.
Quote from CSS specification[^], section 6.1:
"The format of a length value is an optional sign character ('+' or '-', with '+' being the default) immediately followed by a number (with or without a decimal point) immediately followed by a unit identifier (a two-letter abbreviation). After a '0' number, the unit identifier is optional."
---
b { font-weight: normal; }
|
|
|
|
|
Well isn't that special. It apparently pays to read "all" of the manual when you RTFM, DOH...
-Richard
|
|
|
|
|
Hi again Shog,
Sorry to be a pain. After two days of glamorous stuff like ironing during Mikey's naps he finally gave me a chance today to get back to this. Your div contains align="center" but VS gives me the following warning: Warning 1 Validation (XHTML 1.0 Transitional): Attribute 'align' is considered outdated. A newer construct is recommended. . Do you perhaps know what the newer construct is?
Thanks again
A mum and loving it!
|
|
|
|
|
You can use Guffa's method (margin: 0 auto; ). AFAIK, it doesn't work in IE though.
IE does however treat the text-align style the same as the align attribute, so you can combine techniques if you wish: use the text-align:center style on the body / outer DIV, and use margin: 0 auto on the inner DIV.
Last modified: Wednesday, May 31, 2006 9:18:43 AM -- Added IE hack description
|
|
|
|
|
Interesting, thanks, I'll give it a whirl next nap time
A mum and loving it!
|
|
|
|
|
|
Awesome, thanks Richard!
A mum and loving it!
|
|
|
|
|
I'm stuck on a situation to change html element sytle in a webbrowser2 in a mfc dialog program. VC6+windows sdk 2003.
Does anyone have idea how to do it?
i already got the onclick event and get the ihtmlelement object. really emergence, pls help me if you can, thx first.
|
|
|
|
|
I m facing prob when i try to update datagrid.I click the edit button and write data in textboxes but i still get old data which i got from my database.Plz help me!!!!
-- modified at 17:30 Saturday 27th May, 2006
|
|
|
|
|
Hi
put your code here(update code) for error handling
|
|
|
|
|
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
using System.Globalization;
namespace WebApplication4
{
///
/// Summary description for properties.
///
public class properties : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Image Image1;
public DataView dv;
public SqlConnection conn;
public SqlDataAdapter da=new SqlDataAdapter();
public DataSet ds=new DataSet();
public void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
Label1.Text=User.Identity.Name;
string strConnection =" Integrated Security=SSPI;";
strConnection += "initial catalog=dbREO;server=DCSIAN;";
strConnection += "Connect Timeout=30";
conn = new SqlConnection (strConnection);
conn.Open ();
da=new SqlDataAdapter("SELECT * FROM tblCommercialProperty WHERE ID= '" + Label1.Text+ "' " ,conn);
da.Fill(ds,"tblCommercialProperty");
DataGrid1.DataSource=ds.Tables["tblCommercialProperty"];
DataGrid1.DataBind();
}
public void DataGrid1_SelectedIndexChanged(object sender,System.EventArgs e)
{
DataGridItem dgi = ((DataGrid)sender).SelectedItem;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.DataGrid1.CancelCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DataGrid1_CancelCommand);
this.DataGrid1.EditCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DataGrid1_EditCommand);
this.DataGrid1.SortCommand += new System.Web.UI.WebControls.DataGridSortCommandEventHandler(this.DataGrid1_SortCommand);
this.DataGrid1.UpdateCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DataGrid1_UpdateCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
public void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataGrid1.EditItemIndex=e.Item.ItemIndex;
DataGrid1.DataBind();
}
public void DataGrid1_CancelCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataGrid1.EditItemIndex=-1;
DataGrid1.DataBind();
}
public void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataTable dt=new DataTable();
DataRow dr;
dt=ds.Tables["tblCommercialProperty"];
dr=dt.Rows[0];
//I m not using (TextBox)e.item.FindControl because my sql query gives me the single row which have ID=Label1
//The problem is that these cells write actual values in database,i want edited values
//Updation is working correctly because when i move one column's value into another it updates that
dr["CoveredArea"]=((TextBox)e.Item.Cells[3].Controls[0]).Text;
dr["Location"]=((TextBox)e.Item.Cells[4].Controls[0]).Text;
dr["Area"]=((TextBox)e.Item.Cells[5].Controls[0]).Text;
dr["OtherDetails"]=((TextBox)e.Item.Cells[6].Controls[0]).Text;
dr["Status"]=((TextBox)e.Item.Cells[8].Controls[0]).Text;
SqlCommandBuilder cmd=new SqlCommandBuilder(da);
da.Update(ds,"tblCommercialProperty");
DataGrid1.DataSource=ds.Tables["tblCommercialProperty"];
DataGrid1.EditItemIndex=-1;
DataGrid1.DataBind();
}
public void DataGrid1_SortCommand(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
{
dv.Sort=e.SortExpression;
DataGrid1.DataBind();
}
}
}
|
|
|
|
|
Hi,
Bind you datagrid in pastback at the page load time
e.g
Page_load()
if not ispostback then
bindDatagrid()
end if
end sub
Sincerely,
Vineet Kaushik
Sr. Web Developer
|
|
|
|
|
|
I want to prevent users from entering an existing code in my database.
I have a middle tier that checks and return whether a Code exists or not.
Which validation control do i need to tell user that the code they
entered is already existing
t.aransiola
|
|
|
|
|
Use the CustomValidator control. Then you need to write code for its ServerValidate event
You write something like
ars.IsValid = IsValidCode(args.Value)
where IsValidCode() is a function for you to implement, which it looks like you already have from your middle tier.
Then in your Submit or OK button click event
If Page.IsValid Then
...
End If
Kevin
|
|
|
|
|
i dont know if i can do that but im looking to send a form by email, now until now at school i got only to html and javascript and i know that its very easy to be done in asp or cgi. so i wanted to see if its possible to send a form by email using javascript because also i use only geocities as i need to finish my html and javascript project and geocities is not really supporting anything from what i know
would appreciate any help
|
|
|
|
|
Set the action property of the form to the email address: action="mailto:the@email.com".
---
b { font-weight: normal; }
|
|
|
|
|
the problem with that is that it will automatically open the defauly mail client i dont want it to happen
|
|
|
|
|
In that case, no, it's not possible.
---
b { font-weight: normal; }
|
|
|
|
|
i am getting xmlhttp.status=0 instead of 200 which means data is ok . please help me out .
<html>
<head>
<script type="text/javascript">
var xmlhttp
function loadXMLDoc(url)
{
// code for Mozilla, etc.
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest()
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("GET",url,true)
xmlhttp.send(null)
}
// code for IE
else if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
if (xmlhttp)
{
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("GET",url,true)
xmlhttp.send()
}
}
}
function state_Change()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
{
// if "OK"
alert(xmlhttp.status);
if (xmlhttp.status==200)
{
alert("XML data OK")
document.getElementById('A1').innerHTML=xmlhttp.status
document.getElementById('A2').innerHTML=xmlhttp.statusText
document.getElementById('A3').innerHTML=xmlhttp.responseText
}
else
{
alert("Problem retrieving XML data:" + xmlhttp.statusText)
}
}
}
</script>
</head>
<body onload="javscript:loadXMLDoc('menu.xml')">
<h2>Using the HttpRequest Object</h2>
<p><b>status:</b>
<span id="A1"></span>
</p>
<p><b>status text:</b>
<span id="A2"></span>
</p>
<p><b>response:</b>
<br><span id="A3"></span>
</p>
</body>
</html>
my xml file is menu.xml which is
<?xml version="1.0" encoding="UTF-8"?>
<courses>
<topic>
<topicname>Search</topicname>
</topic>
<topic>
<topicname>Lubrication Fundamentals</topicname>
</topic>
</courses>
-- modified at 8:33 Friday 26th May, 2006
|
|
|
|
|
can anyone give me the approach to download a file from a ftp server using multithreding. (i.e. separate threads for downloading simultaneously USING JAVA)
VIVEK
|
|
|
|