|
This is one of those questions that will get you people screaming from both sides of the fence. I have struggled over this question myself, and have come to a conclusion that works well for me. That is, it depends on the situation. These are the advantages of each for me, they may be different for you or someone else.
Tables:
* I've been using them for 10 years and I can whip them up very quickly, and modify them very quickly.
* Relative to using styles, I would say tables are much easier to learn to use.
* Once you get good at them, you can learn to use them with minimum impact on size and page weight.
Styles:
* Generally less markup which means less page weight and faster page load times.
* Allows you to dramatically change the layout of the page with little effort. The caveat to this is that you designed the layout of the page good to begin with. Also keep in mind, while this is cool, how often do you really need to do this?
* Can make pages more usable for visually impaired people because you are removing a lot of the style markup from the text being read.
Also keep in mind that even the hardcore style folks usually advocate using tables in some cases. When you are laying out data that is in a Excel Spreadsheet like format for instance.
To sum it up, I don't think there is a right or wrong way to do it. I use both depending on what my goal is. Get it out the door quick as possible? Very fast page load times? Usable for visually impaired?
Good luck,
Troy
|
|
|
|
|
Hello.
As far as I know using DIV tags for the layouts are easier, but it depends of the website.
With DIV tag and CSS we can create a layout easily, but we should use some CSS tricks to create a better layout.
|
|
|
|
|
I have been using tables all the time until i recently met with a graphic layout designer who recommended me of using the div instead of table. I don't see the difference in terms of performance since the page isn't too loaded with data. But, what i have observed now is that, one should use table when there is a need to display data in a table formate. Think of a table like a Grid or container that shows the data you want it to be displayed.
|
|
|
|
|
I have Windows Vista Ultimate, IIS7. I am trying to deploy ASP.NET and silverlight applications on IIS7.
I am not able to add any application/virtual directory using the IIS manager. This was working fine 2 days ago. I am not sure what changed, and do not know where to look! Can you give me a lead on a solution?
|
|
|
|
|
you need to create virtual directory from you IIS 7
right click on default web site -->Add virtual web site and upload your application published.
it is easy to do.
|
|
|
|
|
I have an ASP GridView that has a PageIndexChanging event wired. I put the GridView in an asp:UpdatePanel and now my PageIndexChanging event does not fire when changing pages. Does anyone have a solution where I can use the UpdatePanel and have my event called as well?
Thanks,
Steve
|
|
|
|
|
I can get the event called in my sample as you described. Can you display the code you are using?
Thanks,
Rajdev KR
|
|
|
|
|
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional" xmlns:asp="#unknown">
<contenttemplate>
<asp:panel id="PanelDADSInformationGrid" runat="server" height="160px" width="100%">
<rsd:customgridview id="GridViewDADSInformation" runat="server" width="98%" horizontalalign="Center" xmlns:rsd="#unknown">
AutoGenerateColumns="false" AllowSorting="True" EnableViewState="true" UseCustomPager="true"
AllowPaging="True" PageSize="4" OnSorting="GridViewDADSInformation_Sorting"
onpageindexchanging="GridViewDADSInformation_PageIndexChanging" OnRowDataBound="GridViewDADSInformation_RowDataBound">
<columns> <asp:templatefield visible="false">
<itemtemplate>
<asp:literal id="PKDADSInformation" runat="server" text="<%# (Convert.ToString(Eval(" pkdadsinformation")))%>"="">
<asp:templatefield headertext="Generated Title" sortexpression="GeneratedTitle">
<itemtemplate>
<asp:textbox id="DADSInfoGeneratedTitle" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" generatedtitle"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("generatedtitle")).equals("zzzzz")="" eval("generatedtitle")).equals("q")="" eval("generatedtitle")).equals("q1"))="" ?="" string.empty="" :="" eval("generatedtitle")%>"="">
Width="195px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>' />
<asp:templatefield headertext="Release" sortexpression="Release">
<itemtemplate>
<asp:textbox id="DADSInfoRelease" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" release"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("release")).equals("zzzzz"))="" eval("generatedtitle")).equals("q")="" ?="" string.empty="" :="" eval("release")="" %>"="">
Width="80px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>'
/>
<asp:templatefield headertext="OS Version" sortexpression="OSVersion">
<itemtemplate>
<asp:textbox id="DADSInfoOSVersion" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" osversion"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("osversion")).equals("zzzzz"))="" eval("generatedtitle")).equals("q")="" ?="" string.empty="" :="" eval("osversion")="" %>"="">
Width="80px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>'
/>
<asp:templatefield headertext="Status" sortexpression="Status">
<itemtemplate>
<asp:dropdownlist id="DADSInfoStatus" runat="server" width="55px" appenddatabounditems="true">
Enabled="true"
OnSelectedIndexChanged="DADSInfoStatus_SelectedIndexChanged" >
<asp:templatefield headertext="DADS Collection" sortexpression="DADSCollection">
<itemtemplate>
<asp:textbox id="DADSInfoDADSCollection" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" dadscollection"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("dadscollection")).equals("zzzzz"))="" eval("generatedtitle")).equals("q")="" ?="" string.empty="" :="" eval("dadscollection")="" %>"="">
Width="80px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>'
/>
<asp:templatefield headertext="Install Doc Location" sortexpression="InstallDocLoc">
<itemtemplate>
<asp:textbox id="DADSInfoInstallDocLoc" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" installdocloc"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("installdocloc")).equals("zzzzz"))="" eval("generatedtitle")).equals("q")="" ?="" string.empty="" :="" eval("installdocloc")="" %>"="">
Width="95px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>'
/>
<asp:templatefield headertext="Associated Doc Loc" sortexpression="AssociatedDocLoc">
<itemtemplate>
<asp:textbox id="DADSInfoAssociatedDocLoc" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" associateddocloc"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("associateddocloc")).equals("zzzzz"))="" eval("generatedtitle")).equals("q")="" ?="" string.empty="" :="" eval("associateddocloc")="" %>"="">
Width="90px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>'
/>
<asp:templatefield headertext="Download Location" sortexpression="DownloadLoc">
<itemtemplate>
<asp:textbox id="DADSInfoDownloadLoc" runat="server" text="<%# (String.IsNullOrEmpty ((string)Eval(" downloadloc"))="" ||="" <br="" mode="hold" >="" ((string)="" eval("downloadloc")).equals("zzzzz"))="" eval("generatedtitle")).equals("q")="" ?="" string.empty="" :="" eval("downloadloc")="" %>"="">
Width="95px" Enabled='<%# IsQueryCollection(Eval("GeneratedTitle").ToString()) %>'
/>
<asp:templatefield headertext="DADS Status" sortexpression="DADSStatus">
<itemtemplate>
<asp:dropdownlist id="DADSInfoDADSStatus" runat="server" width="70px" appenddatabounditems="true">
Enabled="true"
OnSelectedIndexChanged="DADSInfoDADSStatus_SelectedIndexChanged"
>
<asp:listitem value="" enabled="false">
|
|
|
|
|
Hello
I develop a web site wich have folder containe files that are not with aspx extention like(*.doc, *.txt , etc).
The website using Forms Authentication and i put a web.config in the folder :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<deny users="?" />
<allow roles="teacher" />
</authorization>
</system.web>
</configuration>
It is block access to aspx pages but if I attempt to open a file as an anonymous user by entering the full path into IE address bar, the file will open. Opens even with anonymous access supposedly blocked by the web.config file.
I have already view Scott Guthrie blog entry about Integrating ASP.NET Security with Classic ASP and Non-ASP.NET URLs which can be very helpfull but since the website will store on remote web server i am not sure that i will have access to the IIS.
Can you suggest any ideas?
I am looking for a solution that i can deploy in code.
Thanks...
|
|
|
|
|
tomertro wrote: i am not sure that i will have access to the IIS.
Why do you think you can configure/secure a Web Site if you don't have access to the Web Server?
led mike
|
|
|
|
|
tomertro wrote: website will store on remote web server i am not sure that i will have access to the IIS.
Why don't you ask your hosting provider to do this for you?
|
|
|
|
|
Hi All,
I m using Asp.net 2.0 to develop my web app.
i m using Webhandler (.ashx) pages to wrrite some html from backend..
the code is work finr for IE but it is not work for mozilla,safari..
here is the code..
In Javascript i write:-
var xmlhttp = null;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (xmlhttp)
{
xmlhttp.open("POST", "./htask_getDevicesGroupWise.ashx", true);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readystate ==4)
{
try{
var result = xmlhttp.responseText;
eval(result);
LoadingHide();
}
catch(e)
{
}
}
}
xmlhttp.send(null);
}
And in Handler page i just write
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.Write("alert('sfs');")
End Sub
alert message is not showing on mozilla,safari but it is working in IE.
so i think context.Response.Write is not working ..
Why?
Please help!!!
Thanks in advance
Nitin
|
|
|
|
|
function ajax_CreateXMLHttpRequest()
{
var xmlHttpRequest = null;
if (window.XMLHttpRequest)
{
xmlHttpRequest = new XMLHttpRequest();
}
else if (typeof ActiveXObject != "undefined")
{
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
try using above method for creation of xmlHttpRequest
|
|
|
|
|
Hi,
Thanks for reply!!
But it is not working for me....
In fact if you see deeply i m doing the same thing which u suggest...
instead of i use your code in my application but my problem is still remain as it is...
Is there any other setting like http handler in web.config OR for mozilla?
one more thing that my handler page write on .aspx page.
if directly type the URL of my .ashx page then it write the HTML on browser window. but not write on .aspx page.
any idea?
Thanks
|
|
|
|
|
Hi all,
I am using a javascript that checks a variable x and display an alert message using window.event;
My question is that how can i catch the event when ok button is pressed so i can change variable x so it doesnt enter the loop again.
JS code
If (x==true)
{
if (!e) var e = window.event;
e.cancelBubble = true;
e.returnValue = "";
}
any ideas
|
|
|
|
|
Set the name of the function you created in OnClientClick property for the button.
Bhaskara
|
|
|
|
|
Thank you for your reply, however iam not sure if you got what i want.
I dont need to show the message because i did, what i want is when the message appears with ok Cancel buttons i need to catch the event when ok button is pressed.
|
|
|
|
|
|
You will want to apply your Javascript onSubmit of the form-
<form name="demo" onsubmit="return validateFormOnSubmit(this)" action="action.htm">
And you function would have to return true or false-
function validateFormOnSubmit(fld) {
var reason = "";
if (fld==true) {
reason += "There is an error.";
}
if (reason != "") {
alert(reason);
return false;
}
return true;
}
This will go through validation and pass false with an alert, or pass true and POST the information to action.htm. Good luck!
Ranjit Viswakumar
Professional Services Specialist
rviswakumar@hostmysite.com
HostMySite.com[^]
|
|
|
|
|
Hi All,
I could not find out correctly where to post this question. Finally, I thought web development is the best place to post this.
Version history option is not displaying selected version of list items in Custom List Form whereas its working fine in Default List Forms in Windows Sharepoint Services 3.0.
Any idea to get rid off this issue?
Thank you in advance
Raheem MA
|
|
|
|
|
I want to create a .NET website where one of the pages will look like the windows directory structure and the user will be able to download the files/folders.
So basically, I have a bunch of folders on my pc and the website should point to those folders on the website in a similar format and allow the user to download files and zipped folders, etc.
How to achieve this?
|
|
|
|
|
Hi,
you can get a directory and file listing with DirectoryInfo.GetDirectories() and DirectoryInfo.GetFiles(). With this information you could build a ListView or DataGridView on your webpage. Whenever somebody clicks on a row in the view, you have to browse to this directory and do the same again (listing all files and subdirectories). If it is a file, you could point the link directly to the file.
Hope this provides a good starting point to you.
Regards
Sebastian
|
|
|
|
|
Hi All,
I need an urgent help as I am stuck into it since last 2 week.
I am using FBA on sharepoint. I have customize the login.aspx by modifying the simple.master page but I am not able to add webpart on it as this does not inherit webpartpages class.
can any i suggest me how can I add webpart on login.aspx? pls help me out.
Regards
Deewaker
|
|
|
|
|
Is there a way you can use an usercontrol in place of a web part. I know it is a rude way but may be a simple solution.
Bhaskara
|
|
|
|
|
Hello, I am new this website so plese bare with me. My company uses 2007 SharePoint and I have access to modify our SharePoint pages using SharePoint Designer. I need help with the following sceniro:
Someone opens a list in the EditForm.aspx view. When they open it they start to select dropdowns, radio buttons, check boxes, etc. However, what I need to know is how do I hide a field in this view until the value of another field is determined?
Example: If Field 1 = "Yes" then Show Field 2 so that the person can resond to it.
If Field 1 = "No" then Field 2 show not show.
I hope I am making sense. Please provide any feedback. I have searched for two days on the Internet and have found one item that relates to this. It was how to permenantly hide a specific field using JavaScript. Here it is:
***SharePoint list Page starts off with <%@ Page language="C#" MasterPageFile="~masterurl/default.master"
<asp:content contentplaceholderid="PlaceHolderMain" runat="server" xmlns:asp="#unknown">
_spBodyOnLoadFunctionNames.push("hideFields");
function findacontrol(FieldName) {
var arr = document.getElementsByTagName("!");
// get all comments
for (var i=0;i < arr.length; i++ )
{
// now match the field name
if (arr[i].innerHTML.indexOf(FieldName) > 0)
{ return arr[i]; }
}
}
function hideFields() {
var control = findacontrol("RequestID");
control.parentNode.parentNode.style.display="none";
control = findacontrol("ID");
control.parentNode.parentNode.style.display="none";
}
|
|
|
|