|
I'm going to make a quick assumption ... you are using VS.NET, right?
First off, I would imagine that you want could dynamically make the new controls whenever you needed to make them, for example, on the click event of a button.
However, to position them programmatically you will have to play with their style attributes for this to display correctly in a web browser. First thing is to set the positition to absolute and then you can set the top and left style attributes to set their location on the page. If you are using VS.NET and have the Design Mode of a Web Form open and are using the Grid Layout for the page then you can check the HTML used for the form and see how elements are being positioned on the page that are already set through design mode. Hopefully this will give you some insight.
If you are going to be displaying information back to the users from a DB then I would suggest using the DataGrid because of its amazing flexibility. Check out the many articles on http://4guysfromrolla.com[^] for some great resources on ASP.NET.
Wally Atkins Newport News, VA, USA
|
|
|
|
|
Thanks very much for this. I'll give it a try. I'm travelling in China, so my time sync is... well - isn't. But this gives me what I need to get working.
|
|
|
|
|
I am probably missing some very important concept about CGI programming. I am currently reading about CGI programming with Perl and I am wondering why there was no CGI programming functionalities with the traditional compiled languages such as C++.
Perl CGI scripts are run by web servers to generate web content dynamically and that content is sent back to the requesting browser in the form of an HTML web page. To be more specific these scripts are run by Perl.exe, which is installed on the server.
The CGI.pm module has many functionalities and methods for creating HTML on the fly. OK, if that is the case, how come there is no "CGI library" for C++ that contains those similar functions. For example, if you can "#include<cgi.dll>" or something of that sort in your C++ program, then shouldn't you be able to dynamically create HTML web pages too? Yet, up to now, I havent heard any talk about programming the web with C++. How come C++ was never made to build web pages?
|
|
|
|
|
CGI is just an interface so they can be written in C or C++ or whatever.
Scriptable languages seem to have found favour with web development as they are easy to change on the fly - there is no 'compile' step. You could use C++ but there is little advantage.
Davy
Blog for Software Testing, Bugs, Quality, Security and Stability - www.latedecember.com
News From Scotland - The Angus Blog and The Dundee Blog
My Personal Blog - Homepage.
|
|
|
|
|
One of my assignments back in college was to write a few simple C++ applications that were used as CGI's ... it was kind of a pain in the @$$ but with many hours of tinkering I was able to get it to work.
It was tough to figure out how to read in the querystring and form data but once you find out the basics ... returning strings of HTML to the client is very easy.
Wally Atkins Newport News, VA, USA
|
|
|
|
|
You can wirite CGI programs in any language that supports environment variables and standard console I/O. There are CGI class libraries for C++, e.g. GNU cgicc, CGI++, MV4, etc.
|
|
|
|
|
Yes, and we have even created an Application Server that hosts C++ code (similar to a J2EE server). C++, used in the right way within the right framework actually provides the highest level of performance possible for dynamic content. FYI, you shouldn't use CGI. It is one of the slowest and most resource intensive methods of generating dynamic content.
|
|
|
|
|
Is there a way to put spaces between the list item, say bullete, and the texts? I tried putting some spaces using $nbsp; between the list item and the texts but it only work for the first line. If the line of texts wrap then the wrap part is not align with the above line.
Thanks!
ljCharlie
|
|
|
|
|
You need to set the padding-left style on the <li> element.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thanks for the help. Is this what you mean:
<li style="padding-left">The situation---opportunity, problem, issue, need---that <br />
your proposal addresses.
I tried this but it doesn't work. What is padding-left mean?
ljCharlie
|
|
|
|
|
You're nearly there - you just need to tell it how much space you want.
Also, don't forget the list tags (<ul> , <ol> , etc.):
- The situation---opportunity, problem, issue, need---that
your proposal addresses. - The situation---opportunity, problem, issue, need---that
your proposal addresses. - The situation---opportunity, problem, issue, need---that
your proposal addresses.
<ul>
<li>The situation---opportunity, problem, issue, need---that <br />
your proposal addresses.</li>
<li style="padding-left:10px;">The situation---opportunity, problem, issue, need---that <br />
your proposal addresses.</li>
<li style="padding-left:20px;">The situation---opportunity, problem, issue, need---that <br />
your proposal addresses.</li>
</ul>
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thank very much! You've been a tremendous help! It works!
ljCharlie
|
|
|
|
|
I have one more question regarding <li>,<ul>,and <ol> and I wonder if you can helpme again. Here's what I have in my CSS file.
li {
list-style-position: outside;
list-style-type: disc;
padding-left: 10px;
}
ul {
padding-left: 10px;
list-style-position: outside;
list-style-type: upper-alpha;
}
ol {
padding-left: 10px;
list-style-position: outside;
list-style-type: decimal;
}
And here's what I have in my code:
<ul>
<li>Explain how the proposed project goals were met.</li>
<li> Describe the impact of project and who was impacted?</li>
<ol>
<li>Published articles</li>
<li>Conferences</li>
<li>Presentations</li>
<li>Additional funding received (matching grants or other funding)</li>
<li>related to proposal</li>
</ol>
<li>Budget/expenditures</li>
</ul>
But the problem is, anytime when there is <li> in front of the texts, the list item type is a disc. This is what I want. If the <li> is under the <ol>, I want the list item to type decimal. I guess my point is that I the <li> to change type if it is under different <ul> or <ol> tag.
I hope you understand what I'm trying to do.
Many thanks to your help!
ljCharlie
|
|
|
|
|
If I am reading this right, you shouldn't need the list-style-type at all.
With no list-style-type applied in the stylesheet, you will get:- Explain how the proposed project goals were met.
- Describe the impact of project and who was impacted?
- Published articles
- Conferences
- Presentations
- Additional funding received (matching grants or other funding)
- related to proposal
- Budget/expenditures
If you apply a style to an <li> element, it will override the style applied to the <ul> or <ol> elements. If you want to apply different styles depending on the type of list, you can specify the element path in the stylesheet:
li {
padding-left: 10px;
}
ul li {
list-style-type: square;
}
ol li {
list-style-type: lower-roman;
} The styles in the ul li section will apply to an <li> tag under a <ul> tag, and the ol li section will apply to an <li> tag under an <ol> tag. The styles in the li section will apply to both:- Explain how the proposed project goals were met.
- Describe the impact of project and who was impacted?
- Published articles
- Conferences
- Presentations
- Additional funding received (matching grants or other funding)
- related to proposal
- Budget/expenditures
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thank you. It works wonderfully now.
One more question. Because li does not have a list-style-type, li type will automatically change base on and if I have 3 or 4 levels deep of lists, correct?
ljCharlie
|
|
|
|
|
The easiest way to find out is to play around with the settings and see what happens.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thanks! That's what I'm doing now, trying to have find a setting I like. However, many thanks to your help.
ljCharlie
|
|
|
|
|
Hi
Does anyone know how to insert that small little picture found next to a URL on a site?
tx
|
|
|
|
|
Is it.. next to the URL or ... 'left' to the URL... its called as the icon... r u asking the same as I am telling here??? if so, CSS will be of good help
I was born intelligent Education ruined me!.
|
|
|
|
|
If you mean the favicon, this article by Chris M should help
Favicon Article[^]
So few words, and yet so precise! Megan, you're a poet of mathematical accuracy! - Jörgen Sigvardsson
|
|
|
|
|
Hi,
I am working on a Win2K machie with IIS and .net installed. I have made a website which i am trying to view. I have static ip for my computer (I have a cable connection). Anyone on the internet can ping as well as ftp my ip address, but the moment they try to open any htm file they get a error that the "Page cannot be dispalayed". at the bottom of the screen it says "cannot find server or DNS error". On my computer i can view it as http://ipadd/index.html but no one else can view it. I think it has to do with myuser permissions on the wwwroot but am not sure. Please help me out.
Thanx in advance,
Pooja
|
|
|
|
|
This message usually isn't caused by a permissions failure, but by a router or DNS problem. Is there a host (A) record in your DNS database that points to your IP address from your domain name? If not, add one. If so, there may be something odd going on caused by the .Net Framework. I was chatting with another CPian today just after he installed the .Net 1.1 package on a previously working server and it messed up the permissions on the I_USR account. In his case it just prevented pages from accessing the databases they depend on, but it might have other effects. You could try to repost the question with more detail in the topic ('IIS Fails when .Net Installed', for example) to attract more viewers to it.
"Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom
|
|
|
|
|
Perhaps your ISP is blocking HTTP traffic.
Mine does
|
|
|
|
|
Hi
I did finally get it working. It is cause the ISP provider blocked port 80. once i changed the port no to any other no like 8081 it started working.
Thanx for the info
Pooja
|
|
|
|
|
In my tag I have this:
<body bgcolor="#ffffff" onLoad="MM_preloadImages('images/1_home_f2.gif')>
But I also have:
function MM_preloadImages() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();<br />
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)<br />
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}<br />
}
In my .js file that I call from the .shtml page. The problem is this two have the MM_preloadImages name and it's conflicting. If in my tag I have the MM_preloadImages then the .js file will not work and vise versa. What can I do to have both of them work?
Many thanks in advance!
ljCharlie
|
|
|
|