|
Hi
I have built a datagrid which should populate a set of images whose urls are stored in my database, and set each of the images in my datagrid to there corresponding addresses
I have a simple databind method which binds a dataset from a select query into my datagrid
But i am not sure how to access the image address return values, so that I can populate the values thru my datagrid.
here is my code this far
any help much appreciated
Cheers
Boyindie
<code> <asp:DataGrid runat=server ID=dgImage AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" Height="73px" Width="385px" DataKeyField="imageId">
<Columns>
<asp:BoundColumn DataField=imageId HeaderText="Image ID" ></asp:BoundColumn>
<asp:TemplateColumn HeaderText=Products >
<ItemTemplate ><asp:Image runat=server ID=imageHolder ImageUrl="~/test/<%imagetable %>" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:ButtonColumn HeaderText="View item" CommandName=getDetails ButtonType=PushButton Text=Select></asp:ButtonColumn>
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditItemStyle BackColor="#2461BF" />
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<AlternatingItemStyle BackColor="White" BorderColor="#0000C0" />
<ItemStyle BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
</asp:DataGrid></code>
<code>'Builds .net mysql connection and passes connection string into method
Dim connection As New MySqlConnection(connectionString)
'Open connection to DB
connection.Open()
'Create mySql command string for passing query or SPROC(Stored Procedure)
Dim cmdString As New MySqlCommand
'Set Command to equal mySql connection, so can pass SQL query
cmdString.Connection = connection
'Set command string to equal SPROC
cmdString.CommandText = "sp_image"
'ONLY PLACE THIS IF SPROC, sets the command to a SPROC
cmdString.CommandType = CommandType.StoredProcedure
'Create dataAdaptor for passing data between .net and mySQL
Dim dataAdaptor As New MySqlDataAdapter
'Sets command object to datAdaptor
dataAdaptor.SelectCommand = cmdString
'Creates a dataset which will be filled with data from
'dataAdaptor
Dim ds As New DataSet
dataAdaptor.Fill(ds)
'Creates Table which is filled data from dataset
Dim dataTable As New DataTable
dataTable = ds.Tables(0)
'Sets datagrids source to datatable
dgImage.DataSource = dataTable
'binds ds to datgrid
dgImage.DataBind()</code>
|
|
|
|
|
Hello everyone ,
I have an application which I want analysing its performances.
CPU time, memory...
there are tools like Vtune...but I have to use .net performance tools or libraries.
But i do not have any idea about them
Someone can help me?
Thanks.
assia
hgfh
|
|
|
|
|
You can use the PerformanceCounter class which ties into the Performance Counter in the Administrative Tools section of Control Panel. You can pull down many different performance metrics with this class...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Ok thanks Paul
hgfh
|
|
|
|
|
You are very welcome, and I think there is an article or two here on Code Project about using the PerformanceCounter class.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
1) I'm running VS2005 under XP Pro.
2) I'm writing an ASP.net 2.0 app that provides user authentication/access to a classic ASP site.
3) The internal IIS server in VS2005 is not capable of running classic ASP code, so I installed IIS 5.x. I would like to have installed IIS 6, but that's evidently not possible under XP Pro (if anyone can claim otherwise, by all means, do so).
My problem is that IIS5 apparently is only partially aware that .Net 2.0 is installed on the machine. I can't seem to browse http://localhost (I get the access denied page).
Should I have installed IIS5 before installing VS2005, or am I simply missing some simple yet vital tidbit of info?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I haven't had a problem with .net 2.0, but I once had a problem with .net 1.1 where I installed asp.net first and then iis 5.X. asp.net did not work right. So I reinstalled asp.net and everything started to work correctly. So I think that is probably what you need to do. By the way there is no way for you to run iis 6.x on an xp pro box.
Hope that helps.
Ben
|
|
|
|
|
Look in the properties for the website (in IIS), and go to the ASP.NET tab. Check that you've selected the .NET 2 settings.
If there are problems, you may end up having to do an aspnet_reg.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I m new for .NET, i want to change the input language to "URDU" as soon as my application runs..... Bt i dont know how to do it any help?
(Jameel)
|
|
|
|
|
Hi
I was wondering if someone could assist me with this, my laptop has recently broken down and I have had to install visual studio on my desktop
But my desktop is running on Windows Media Centre, is it possible to run and asp application off this machine as i can't get my project to compile
Any help appreciated
boyindie
|
|
|
|
|
I presume since you posted this in the .NET forum you actually meant ASP.NET application.
If so then yes it is possible to do this on Media Centre edition of windows. What is the error you are getting - that might help track down the problem.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
I have sorted the error, jus realised i had downloaded an older version of the mysql .NET connector
cheers anyway
boyindie
|
|
|
|
|
When I am using Crystal reports in asp.net I want to Export the report but it shows an "Logon Failed Error".
|
|
|
|
|
shankari.L wrote: "Logon Failed Error"
Sounds like user credentials are wrong somewheres.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I haven't had a need (or the time lately) to look at Framework 3.0, much less 3.5... I was under the impression that the additions in 3.0 were Vista specific. If I'm not planning on hoping on that sinking ship, is there a point to using 3.0? Is 3.0 relevant to XP/2000? And along those same lines, what about Studio 2008 and Framework 3.5?
Obviously I need to look into it, but thought I'd get some preliminary opinions from you guys first.
|
|
|
|
|
3.0 is NOT Vista specific. Well, mostly... 3.0 is the 2.0 base class library with extensions for Windows Communication Foundation (not Vista specific), Windows Workflow Foundation (not Vista specific), Windows Cardspace (not Vista specific), and Windows Persentation Foundation (mostly Vista specific). A kind-of crippled version of WPF worked on XP SP2, but nobody I know uses it on XP. It works much better on Vista.
3.5/VS2008 has LOTS of changes. Read[^].
|
|
|
|
|
Thanks for the info. I assumed it was relevant, just wasn't sure what all was in there. It was kind of strange having a framework release with no Stuio release though. 1.1 required a Studio upgrade from 2002 to 2003. Does 2005 require an update to use 3.0?
-- modified at 12:21 Monday 23rd July, 2007
Ok, after reading some of the articles he lists in his blog, I kind of have an answer to that. Thanks again for the info.
|
|
|
|
|
BoneSoft wrote: Does 2005 require an update to use 3.0?
Nope.
VS2008 will change the way it works with the .NET Framework. It'll be able to build against any version of the .NET Framework. The one-to-one releationship won't exist anymore.
|
|
|
|
|
Dave Kreskowiak wrote: VS2008 will change the way it works with the .NET Framework. ... The one-to-one relationship won't exist anymore.
That is going to be nice.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Has anyone seen any indication of what we can expect in VS2008 in terms of support for native C++/MFC code?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Dave Kreskowiak wrote: Windows Persentation Foundation (mostly Vista specific). A kind-of crippled version of WPF worked on XP SP2, but nobody I know uses it on XP. It works much better on Vista.
Hmm.. what do you base this on? It works just fine for me and I have seen nothing in WPF that will work on Vista but won't work on my machine.
Granted, absence of evidence isn't evidence of absence, I just haven't seen anything that supports your assertion... links please
|
|
|
|
|
1. I am trying to use or migrate windows application written in C# into Web Application? Can any body help me out to solve this problem
2. Is there any utility to handle images (like rotation, Transformation, resizing)in WEB Application using C#?
Regards,
Satya
satyendra
|
|
|
|
|
satyendramanish wrote: 1. I am trying to use or migrate windows application written in C# into Web Application? Can any body help me out to solve this problem
Start rewriting it. There is no magical conversion tool to do this. If your Windows Forms app was written properly, meaning seperating Business Logic and Data Access from the Presentation Layer, all you'll have to rewrite is the Presentation Layer. But, somehow, I doubt this is going to be the case.
satyendramanish wrote: 2. Is there any utility to handle images (like rotation, Transformation, resizing)in WEB Application using C#?
I imagine any image manipluation library would work, but every change you make to the image would require a roudtrip to the server and put the web server under a greater load.
As for client-side manipulation, that would require a Java-based library.
|
|
|
|
|
That's the wrong direction; all Web apps should be converted to Win apps.
|
|
|
|