|
hi, can someone help me, I just check my website from firefox and the images are very big!! in internet explorer the images are good with my height and width size for the images. But with firefox, images are showing in their default size. how can i solve this problem
The website is: www.ivanandsimone.com/query/home.aspx
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
For firefox, you'll need to set the height and probably width attributes for the IMG element. Setting the height for a table and not for the image isn't likely to be honored by many browsers when the image is larger than the table cell.
|
|
|
|
|
thanks, but how to set the attributes please?? Thanks alot..
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
|
I have it like this:
asp:imagebutton id="imgItem1" runat="server" Height="75px" Width="93px" ImageAlign="Middle" asp:imagebutton
But its not working
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Not sure why you're using ImageButton when Image should work fine on it's own. However, look at the code for your page: http://www.ivanandsimone.com/query/Item.aspx[^]. It seems to be sizing the image as it should. Compare what's different in your code and that should solve your problem.
|
|
|
|
|
hi, i am using imagebutton because i want the user to click on it and it leads him to another website with the picture's contents as you can see from www.ivanandsimone.com/Query/Home.aspx..
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
When a page looks different in Firefox and Internet Explorer, it's almost always Firefox that renders the page correctly.
The input fields that you use to display the images are inline objects, so setting width and height does not apply to them. Internet Explorer incorrectly applies the size to the fields anyway. Opera and Netscape handles it correctly, though, just as Firefox. You have to turn the fields into block objects using display:block if you want to be able to set the size.
Do yourself a favour and test the page in Firefox while you are building it. Then there is a very good chance that it will also look the same in all the other browsers, except Internet Explorer or course. You will often need to do some tweaking to make it work in Internet Explorer also, but it's much easier than to tweak a page that only works in Internet Explorer into working in all the other browsers also.
---
Year happy = new Year(2007);
|
|
|
|
|
Hey experts,
I have a aspx page with a datasource that select images from a mysql database. This datasource i binded with two FormViews.
1st: Displays all images as thumbnails in a left column.
2st: Displays the full image that is selected in left column.
Now for my question. I have noticed that the selected and selecting events is fired twice. Guess this is the way the sqldatasource control works...
By is there any way to stop the events firing twice. Seems like big overhead selecting images as blob from a database twice, when one time would be enough.
Hope somebody out there know someting about this.
Regards Anders, DK
|
|
|
|
|
You can set the EnableCaching property to true and use a couple of caching properties of the control to cache data from the Select method. See SqlDataSource Members [^]
|
|
|
|
|
Ahhh simple solution, like it. Thanks alot, works like a charm.
-Anders
|
|
|
|
|
Hi all. I am developing application in C#. I have a web page with some data to be PRINTED. I want to know How I can Print the page in ASP.NET 2.0. Please guide me in this regard. If somebody know any tutorial about it, please tell me its url. I will be very thankful to you.
|
|
|
|
|
Your app needs to print on the browser end, so either the user has to select print, or if there's a function in javascript that forces a print ( I think there is ), you need to call that on the client side in response to a click.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi, i use C#-Aspx with VS2005. I try to display an image in a DataGrid-Column, which comes as a Byte Array from a DataBase.
I have this code:
...
<asp:BoundColumn DataField="Title"
HeaderText="Title">
</asp:BoundColumn>
<asp:ObjectDataSource ID="MyDataSource" runat="server"
SelectMethod="GetData"
TypeName="MyApp.Helper">
<SelectParameters>
<asp:ControlParameter ControlID="MyDropDownList"
Name="MyId" PropertyName="SelectedValue" Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>
...
How can i add a picture-column after the boundcolumn ?? I don`t want to use
an extra "loadpicture.aspx", etc..
I tried to add: "<%Response.BinaryWrite(Picture)%>", but i got the error, that "Picture" isn`t known.
I tried TemplateColumn, too, but i need a ImageUrl for this (which need a loadpicture.aspx ;().
Is this new "DynamicImage" the solution ??
Thx
Lurker32
|
|
|
|
|
Lurker32 wrote: "<%Response.BinaryWrite(Picture)%>",
Do you have a variable or property called Picture in your class ?
Lurker32 wrote: I tried TemplateColumn, too, but i need a ImageUrl for this (which need a loadpicture.aspx ;().
Why do you need a seperate page to load your picture ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I made it with a Gridview (and an imagefield) instead of DataGrid.
...
dataimageurlfield="ID"
dataimageurlformatstring="loadImage.aspx?MyId={0}"
...
The loadImage (with code-behind) takes the ID and calls a method, which gives several strings
and the picture-bytearray in return.
-- modified at 7:09 Friday 12th January, 2007
|
|
|
|
|
i develop some reports using crystal report and when i run the report in ie browser,it get all of data in one page but when i print the report it print in alot of page and the page header visiable in first page.
i want to visiable the page header in all page
thanks
|
|
|
|
|
I haven't used crystal in a long time but if I remember correctly the only thing you can do is render a pdf to client and the user print that. The html version never prints just right.
|
|
|
|
|
Hi,
I have an value bound to a column in a datagrid. I need to pass that value to a function. I thought this would easy for me.
I used something like:
Dim e As DataGridItem<br />
ds = obj.getDetails(e.Cells(0).Text)
This would mean that it is trying to extract as a string OR convert the contents of the cell to string. I need the value to be extracted as an integer. Char to Integer conversions cannot happen.
Please advise me if you can. Is there a straighforward way to extract the value of that cell?? Thank you.
-- modified at 9:52 Wednesday 10th January, 2007
|
|
|
|
|
The table cell contains a string value, not a number. If you want the value as a number, you have to parse the string.
If the value in the table cell comes from a numeric field in the data source, you have to read the value from the data source instead of from the table cell to get it in the original numeric form. When the value is put in the table cell it's convertered into a string value.
---
Year happy = new Year(2007);
|
|
|
|
|
Thank you for the reply mate. Very useful info!
|
|
|
|
|
I'm having an error message sounding like :
Prepared statement '(@id text)SELECT * from isp_email.staff where @id like +txtname.' expects parameter @id, which was not supplied.
This message appear when I press button to select a row at run time. What could be the problem?
SqlCommand myCommand = new SqlCommand();
myCommand.Connection=con;
myCommand.CommandText="SELECT * from isp_email.staff where @id like +txtname.Text";
SqlParameter myparam = new SqlParameter("@id",SqlDbType.Text);
myparam.Value=ID;
myCommand.Parameters.Add(myparam);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds);
con.Open();
myCommand.ExecuteNonQuery();
dgupdate.DataSource=ds;
dgupdate.DataBind();
con.Close();
Thank you.
|
|
|
|
|
Try this instead. Also you should attempt to use stored procedures whenever possible.
myCommand.CommandText="SELECT * from isp_email.staff where @id like '" + txtname.Text + "'";
only two letters away from being an asset
|
|
|
|
|
It does not give any change still get the same error. Do you think there can there is any difference? Because I never use them but looks like it works.
Thank you very much.
|
|
|
|
|
Sorry missed something, try this
myCommand.CommandText="SELECT * from isp_email.staff where id = @id and name like '" + txtname.Text + "'";
Assuming id and name are the names of the columns in the database
only two letters away from being an asset
|
|
|
|