|
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
|
|
|
|
|
Actually you shouldn't try this, because the query would be vulnerable to a SQL Injection. Instead do it like this:
myCommand.CommandText="SELECT * from isp_email.staff where id = @id and name like '%' + @name + '%'";
myCommand.Parameters.Add("@name", txtname.Text);
|
|
|
|
|
I think in place @id, he need to give the column name and there exactly he may be doing wrong.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Still no different. but I've tried this "SELECT * from isp_email.staff where fullname=@fullname and fullname Like %'"+txtname.Text+"'%"; and the error was like:Incorrect syntax near 'Ndayahundwa,Claude'. could I be on the write truck?
|
|
|
|
|
Continue in the same thread instead of starting a new.
You are still trying to use an ASP.NET control from the database. I already explained that the database can not use it.
---
Year happy = new Year(2007);
|
|
|
|
|
Thanks What do you mean by running thread? If you could be more specific please because I'm afraid I'm not getting what exactly you are trying to advise me
Thank you.
|
|
|
|
|
What exactly he wanted to say is you have earlier also posted the same question in this forum so inspite of creating a new forum continue that thread only.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Friends,
I have developed some crystal reports on my development machine everything is working fine.
But when i deployed them on server where we haven't got visual studio and crystal reports installed.
it gives error.
that is assembly refrence for CrystalDecion framework not found.
there is not any DLL file for crystal framework its in GAC so can any one tell me .
Whats the best way to deploy Crystal reports with a web solution.?
thanks
Naveed Kamboh
|
|
|
|