|
hi dotnethead, thanks for your reply. But currently i'm only allow to use Mircosoft Visual Studio .NET 2003 to do my web page. Is there any way that i can do it using 2003 program.. Or other methods which i can easily create a navigation bar? Thanks!!
Cheers!
|
|
|
|
|
I've done a site wide navigation control before using a User Control. A User Control is just like any other control on your page (ei, button, textbox, checkbox, etc.) but it is one that you write yourself. Once it is written you can include it in any page on your site. Cehck out this page for a simple User Control tutorial:
http://www.asp101.com/lessons/usercontrols.asp[^]
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
So I have a div on my page
now How can I put two more divs inside "containter" side by side, giving me a 2 column page? What is the best method (i.e. css) to do this with divs and so it shows up (semi) the same in ie and firefox?
I try this...
<%@ Page language="c#" Codebehind="test.aspx.cs" AutoEventWireup="false" Inherits="wpmc2006.org.test" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>test</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<style> div { border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid; }
div.right { float:right; width:50%;}
div.left { float:left; width:50%}
</style>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<div>
<div class="left">left</div>
<div class="right">right</div>
</div>
</form>
</body>
</HTML>
IE displays it just how I want but firefox always ruins it. How do i do 2 parallel columns in firefox?
/\ |_ E X E GG
-- modified at 18:53 Wednesday 7th December, 2005
|
|
|
|
|
Use 2 spans instead?
daniero
|
|
|
|
|
well if I use spans, i eventually want to use divs inside them and you cant use divs inside of spans..
/\ |_ E X E GG
|
|
|
|
|
Take a look at Little Boxes[^]. I think that will help you.
Wout Louwers
|
|
|
|
|
If IE and Fx displays the page differently, it's almost always Fx that displays it correctly.
Use a more recent doctype. Just version 4.01 should make a noticable improvement.
W3C: Recommended DTDs[^]
---
b { font-weight: normal; }
|
|
|
|
|
I have text in my webpage and I want to make a simple Buton that on click : selects, copy all the text on clipboard, and finally deselects all
or at least just selects all
I think it´s very simple using JavaScript but I cant get it
any comments ?
THANX ¡¡¡
Armando
Monterrey, Mexico
|
|
|
|
|
Hi there,
IMO, just simple getting the selected text from the textbox control and do paste the selected text into clipboard by using this statement
window.clipboardData.setData("Text",selectedText);
<< >>
|
|
|
|
|
I tried by using this " onClick="javascript:select();" " but it only selects the text that is into the button not the text on the webpage
And I didnt get the idea you gave me so could you give another one using my example?
|
|
|
|
|
where is the text you put it into (textbox or textarea control)? or do you want to copy whole page?
<< >>
|
|
|
|
|
I want to copy the whole page, My page doesnt have any pics, only text
thanx ¡
|
|
|
|
|
Just a suggestion, but IMO it's not the best
save the page's content into a hidden field before generating the page. Then, when user clicks on the button, just copy the value of the hidden field to the clipboard.
Hope it gives u an idea...
<< >>
|
|
|
|
|
I hate Internet-Explorer-only solutions; however, here's one for you:
var r = document.body.createTextRange();
r.select();
r.execCommand( "copy" );
If you want a cross-browser implementation, may I suggest reading the innerHTML property of document.body and using regular expressions to remove any tags.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Found this on the web. It copies the selection in a drop-down to the clipboard. Could probably be modified to copy other text on the page:
<html>
<head>
<script>
function copyText(theSel) {
if (!document.all) return; // IE only
theForm = theSel.form;
theForm.copyArea.value=theSel.options[theSel.selectedIndex].value;
r=theForm.copyArea.createTextRange();
r.select();
r.execCommand('copy');
}
</script>
</head>
<body>
<form>
<select onChange="copyText(this)">
<option value="">Please select
<option value="alpha">A
<option value="bravo">B
</select>
<input type="hidden" name="copyArea" value="">
</form>
</body>
</html>
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Hello, I am new to this forum.
sorry i got a bit carried away and did not get a chance to post my question the first time. I am new to programming. I am trying to build an ASP form.
So far I was being successful. Until I came across checkboxes.
When I check a checkbox in my form it sends the information to ms access and the checkbox gets checked. but when I try to access the data in my Update form, all my checkboxes are empty. I did an <% = rsGuestbook("standard") %>
after the " just to be sure that the checkbox was checked when it checked it shows True and when is not it shows False.
How can I get the checkbox to show checked in my Update Page?
edgarv
|
|
|
|
|
Hi there,
To check the checkbox you have to use CHECKED attribute. For more info, go to Checkbox
<< >>
|
|
|
|
|
I am afraid I got lost in the explanation. I am very new to asp.
I was able to find something elsewhere
>
but still does not work any ideas?
|
|
|
|
|
Can you send the HTML code generated from asp page???
<< >>
|
|
|
|
|
here is what the Update Form looks like
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsGuestbook 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be updated
'Read in the record number to be updated
lngRecordNo = CLng(Request.QueryString("ID"))
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("aqpc.mdb")
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM aqtst where ID= "&request.querystring("linknumber")
'Open the recordset with the SQL query
rsGuestbook.Open strSQL, adoCon
%>
<title>AQPC Update Form
<% = rsGuestbook("custom") %>
<% = rsGuestbook("custom") %>
<% = rsGuestbook("standard") %>
<%
'Reset server objects
rsGuestbook.Close
Set rsGuestbook = Nothing
Set adoCon = Nothing
%>
And here is what the update_entry.asp looks like
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% 'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsUpdateEntry 'Holds the recordset for the record to be updated
Dim strSQL 'Holds the SQL query to query the database
Dim lngRecordNo 'Holds the record number to be updated
'Read in the record number to be updated
lngRecordNo = CLng(Request.Form("ID"))
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("aqpc.mdb")
'Create an ADO recordset object
Set rsUpdateEntry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM aqtst"
'Set the cursor type we are using so we can navigate through the recordset
rsUpdateEntry.CursorType = 2
'Set the lock type so that the record is locked by ADO when it is updated
rsUpdateEntry.LockType = 3
'Open the recordset with the SQL query
rsUpdateEntry.Open strSQL, adoCon
'Update the record in the recordset
rsUpdateEntry.Fields("customer") = Request.Form("customer")
rsUpdateEntry.Fields("partdescription") = Request.Form("partdescription")
rsUpdateEntry.Fields("sketchnumber") = Request.Form("sketchnumber")
rsUpdateEntry.Fields("revision") = Request.Form("revision")
rsUpdateEntry.Fields("daviespartnumber") = Request.Form("daviespartnumber")
rsUpdateEntry.Fields("customerpartno") = Request.Form("customerpartno")
rsUpdateEntry.Fields("projedtleader") = Request.Form("projedtleader")
rsUpdateEntry.Fields("projectinitiationdate") = Request.Form("projectinitiationdate")
rsUpdateEntry.Fields("planrevisiondate") = Request.Form("planrevisiondate")
rsUpdateEntry.Fields("planrevision") = Request.Form("planrevision")
rsUpdateEntry.Fields("status") = Request.Form("status")
rsUpdateEntry.Fields("custom") =Len (Request.Form("custom")) = true
rsUpdateEntry.Fields("standard") =Len (Request.Form("standard")) = true
'Write the updated recordset to the database
rsUpdateEntry.Update
'Reset server objects
rsUpdateEntry.Close
Set rsUpdateEntry = Nothing
Set adoCon = Nothing
'Return to the update select page in case another record needs deleting
Response.Redirect "aq2"
%>
somebody suggested this
rsUpdateEntry.Fields("custom") =Len (Request.Form("custom")) = true
so I put it in the update_entry.asp. And now if I write it the regular way
rsUpdateEntry.Fields("custom") = (Request.Form("custom")
I get this error
Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/aqpc/wb/update_entry.asp, line 37, column 56
so I have been using
rsUpdateEntry.Fields("custom") =Len (Request.Form("custom")) = true
I really need help with this. I really appreciate the help. | | | | | | Project
# <% = rsGuestbook("id") %> | | | | | | | | | | Customer |
"
| Project Leader | " | | | | Part Description | "
| Project Initiation Date | " | | | | Sketch Number | "
| Plan Revision Date | " | | | | Revision | "
| Plan Revision | " | | | | Davies Part Number | "
| Custom | "checked > | | | | Customer Part Number | "
| Standard | "checked > | | |
|
|
|
|
|
|
sorry i got a bit carried away and did not get a chance to post my question I am new to programming. I am trying to build an ASP form.
So far I was being successful. Until I came across checkboxes.
When I check a checkbox in my form it sends the information to ms access and the checkbox gets checked. but when I try to access the data in my Update form, all my checkboxes are empty. I did an <% = rsGuestbook("standard") %>
after the " just to be sure that the checkbox was checked when it checked it shows True and when is not it shows False.
How can I get the checkbox to show checked in my Update Page?
In advance thank you for the help.
|
|
|
|
|
Hi.. I'm currently like to do a menu page using C# web application. On the menu page itself i will like to use css(cascading style sheet) and do. From there then i like the page to .aspx. I would like to ask if anyones has done css or who knows it, don't mind share with me as i using css file for the 1st time. Thanks!!
Cheers!
|
|
|
|
|
Hi there,
just simply create ur css file and then make a reference to this file in ur aspx page inside the tag as below..
....
....
<< >>
|
|
|
|
|
Hi.. I just like to ask that.. I have create the code below under css file:
body
{
background-color: yellow;
}
.cwMainBorderColor
{
background-color: #003e56;
}
.cwSideBarHolder
{
border-right: white 2px solid;
vertical-align: top;
width: 2%;
background-color: #003e56;
}
.cwTextBox
{
font-weight: normal;
font-size: 13px;
color: black;
font-family: Arial, sans-serif;
}
.cwComboBox
{
font-weight: normal;
font-size: 13px;
color: black;
font-family: Arial, sans-serif;
}
.cwCheckBox
{
font-weight: normal;
font-size: 13px;
color: black;
font-family: Arial, sans-serif;
}
.cwRadioButton
{
font-weight: normal;
font-size: 13px;
color: black;
font-family: Arial, sans-serif;
}
.cwButtonTiny
{
font-size: 8pt;
background-image: url(Images/Buttons/b_tiny.gif);
width: 40px;
cursor: hand;
color: #2a5f86;
border-top-style: none;
background-repeat: no-repeat;
font-family: Verdana, Arial, Helvetica, sans-serif;
border-right-style: none;
border-left-style: none;
height: 27px;
border-bottom-style: none;
}
And i have also put the stylesheet to the aspx page inside the tag as below..
....
....
But somehow it dosen't work at all!! When i run the aspx it show nothing at all.. Am i missing out on somthing?? Thanks for your help..
Cheers!
|
|
|
|