|
il_manti wrote: PS: my biggest problem here is: the code behind will still need what username i am viewing in order to retrieve the data from the database (something like getImageList(username)). how can i read the username with my method -- or yours -- since it's not in the address bar as a query?
The form method you are familiar with is called "get" , where the browser passes the variable data along by appending a '? ' followed by the variable name , an '= ' and the variable data to the target url. Multiple variables are seperated by an ampersand (& ).
i.e. user_reply.asp?forumid=12076&main=/script/comments/forums.asp&select=1798826
It's a quick way to pass information and the model also allows you to create dynamic links (which you will no doubt need in your project).
Another method you might remember or have seen at least once is "post ". Post is often used to transmit more sensitive information such as login names and passwords, birthdates and credit card information which should not be visible to the user. It is adviseable to use this method when working with a secure connection, or when transmitting a large string such as this paragraph. It may also help prevent SQL injection.
A variable passed using "post" is not displayed in the url, but may be used in much the same way. If you are looking for a cleaner look you may use this method, but you should also consider the fact that you must balance functionality and SEO. Search engines might not be able to effectively crawl a site that uses a "post " form method as a means of navigation, unless you include an xml sitemap that is constantly updated as new directories are created.
Roswell
"Angelinos -- excuse me. There will be civility today." Antonio VillaRaigosa City Mayor, Los Angeles, CA
|
|
|
|
|
Hi all,
Just wondering if you could help me with a newbie problem !
I have opened up asp.net 2.0 found the design screen and added a button – so far so good !
However I cannot position the button where I want it everything just goes in a line and I am not able to drag it. It behaves more like word than a UI designer
Any help would be most appreciated !!!
Thanks Again
John
|
|
|
|
|
if you are building a web application the solution would be to create a table for all your elements, so the placement would be handled by html, or a less newbie-friendly solution would be CSS...
so basically it's like
<table>
<tr>
<td>
<asp:button id="ButtonID" runat="server" Text="ButtonText"></asp:button>
</td>
</tr>
</table>
Roswell
"Angelinos -- excuse me. There will be civility today."Antonio VillaRaigosa City Mayor, Los Angeles, CA
|
|
|
|
|
this is how things actually work in web design. you are seeing it strange because you've probably been accustomed to the "grid-like" structure of UI design. in HTML if you're going to put something it's going to find itself on the top right corner of the screen. simple. this is how it's supposed to work. the first time i saw it i was just like you ... "wdf is going on?! this is stupid...". but then, you know, it's how it's always been in html!
of course you can go about this in different ways:
a. create a table as described above and set everything up in different cells (kinda recommended).
b. css. and divs. very powerful. you can give absolute positioning in x,y co-ordinates (but not recommended) or you can set them up with padding percentages, margins, etc (highly recommended). look it up
c. you could choose the "page layout" property and change it to "GridLayout" instead of "FlowLayout" (but... i still recommend the divs together with css if you're really into good and clean web design)
>>>>> In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
|
In asp.net 1.1, you could actually position things around the form just like a windows form. I think that's removed with 2.0 though.
I personally use css for all my presentation stuff but for newbs ( and a lot of pro's ), table layout is just as good. I'd say use tables for your layout until you get a handle of the behavior of html. Then, pick up a book by Eric Miers ( Css something ). He's a GREAT author on css.
Good luck with it all!
Thanks for firing me Darrell Eaker of Ringgold Telephone Company. I TRIPLED my salary and don't have to deal with douchebags like you.
|
|
|
|
|
I agree that book is great. For the record, it's still there in 2.0. Just not as obvious as it was. In fact, grid layout is just an automated way of creating CSS.
|
|
|
|
|
yup. I forgot to mention that css is created in the background. Good call!
Andy
|
|
|
|
|
what are the causes of these error...
|
|
|
|
|
That could be just about anything. What does the rest of the error message say?
---
b { font-weight: normal; }
|
|
|
|
|
With the extreme details of your description, it narrowed it down to the point I'm tossing between 2 causes.
|
|
|
|
|
Hi,
I dont know whether it is a right forum to discuss. But please give me some note on it.
How can we achieve OLE (Obect Linking and Embedding) Concept in .Net.
If any body having idea please let me know. Thanks in advance
Thanks and Regards
Venkat
|
|
|
|
|
here is my code at the button click event
System.Threading.Thread.Sleep(3600000)
response.redirect("Somepage.aspx")
|
|
|
|
|
So, you expect to not get an error after a few hours?
|
|
|
|
|
how to embed a flash (myFile.swf) into my ASP.net Web page
|
|
|
|
|
You'll probably want to further customize it:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="640" height="640" id="myFile" align="left">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="myFile.swf" />
<param name="loop" value="false" />
<param name="quality" value="best" />
<param name="bgcolor" value="#ffffff" />
<embed src="myFile.swf" quality="best" bgcolor="#ffffff" width="640" height="640" name="myFile" align="left" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
|
|
|
|
|
hi friends
i have problem in c#.
my code is.
if (e.Row.RowType == ListItemType.Item || e.Row.RowType == ListItemType.AlternatingItem)<br />
{<br />
}
proble is
CS0019: Operator '==' cannot be applied to operands of type 'System.Web.UI.WebControls.DataControlRowType' and 'System.Web.UI.WebControls.ListItemType'
Pathan
|
|
|
|
|
i think you can give e.item.itemtype instead of e.row.rowtype
|
|
|
|
|
Hi
i am working in aspnet 2.0 and i have a gridview not datagrid.
and i think ,in gridview,row is used instead of item.
so i cant use e.item.itemtype
i have just tried it i got this error.
'System.Web.UI.WebControls.GridViewRowEventArgs' does not contain a definition for 'Item'
pathan
|
|
|
|
|
You should use a different enumeration, not ListItemType.
Try like this:
"e.Row.RowType==DataControlRowType.DataRow"
if it doesn't work see what type e.Row.RowType is; in VS2005 hust hover the mouse over it.
|
|
|
|
|
Try the 'is' operator instead:
if( e.Row.RowType is System.Web.UI.WebControls.DataControlRowType )
{
Console.WriteLine( "yep" );
}
Thanks for firing me Darrell Eaker of Ringgold Telephone Company. I TRIPLED my salary and don't have to deal with douchebags like you.
|
|
|
|
|
hi friends
i have 3 textboxes.
1st is startime.
2nd is end time.
3rd is shift time.
format is xx:xx:xx
now i want to substract from end time to start time and get result in shifttime on focus evtns of shifttime.
how to do it?
plz give me right solution or any link.
thanks is advance
plz
|
|
|
|
|
Convert the text to a DateTime object, subtract one from the other which results in a TimeSpan object - This is your answer. All you then need to do is format it for display.
|
|
|
|
|
Hello,
I have an ASP.NET page that draws image URLs from a database in order to display a product image on a product template page. I'd like to be able to install the expected "click on image to view larger resolution" pop-up feature found in almost all online product catalogs.
All of the info I have found so far about using large image pop-up scripts refer to static images - that is, images that are unique to that webpage, rather than drawn from a database field. I'm not clear on how to do a pop-up of an image drawn from a field dynamically. Any advice would be appreciated!
I found and tried to insert the following code into my page, but it is bringing up an "BC30456: 'DataItem' is not a member of 'System.Web.UI.Control'." error:
<code><a href="#StayHere" onclick="window.open('bigimage.aspx?id=' +<%# (DataBinder.eval(Container.DataItem,"product_id"))%>, '', 'width=550 scrollbar=yes height=650 left=100 ')">
<asp:Image ID="Image1" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Image1")%>' AlternateText='View Large Image' Runat="server" Width=204>
</asp:Image></td></code>
|
|
|
|