Monday, March 26, 2012
Please help - Client/Server communication with VB.Net/ASP
another computer for testing.
On the "host" computer I have installed IIS and used VB.Net to create an
HTML member in the c:\ root directory called Index.htm. This module is a
simple "Hello World" HTML file. This machine is connected to the internet
and has a static IP address.
On the "Client" computer I enter the IP address of the host (with or without
"\Index.htm") on the Address line of IE6 and press enter.
I should then see my "Hello World" file, right? Well, I get "This page
cannot be displayed". What am I missing??
Thanks in advance,
JohnHi John,
I think you should put the Index.htm under wwwroot folder. By default, it is
the "c:\inetpub\wwwroot" folder.
--
Regards,
Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
"John Howard" <john_howard@.dcf.state.fl.us> wrote in message
news:3ffea1e2$1@.news.hcs.net...
> I am writing my first VB.Net ASP application and would like to set up
> another computer for testing.
> On the "host" computer I have installed IIS and used VB.Net to create an
> HTML member in the c:\ root directory called Index.htm. This module is a
> simple "Hello World" HTML file. This machine is connected to the internet
> and has a static IP address.
> On the "Client" computer I enter the IP address of the host (with or
without
> "\Index.htm") on the Address line of IE6 and press enter.
> I should then see my "Hello World" file, right? Well, I get "This page
> cannot be displayed". What am I missing??
> Thanks in advance,
> John
Saturday, March 24, 2012
Please Help Datagrid Columns
I have a select query that list out the Computer brand and the price.
what I want is that when I click on the computer brand then the respective information about this brand will be display in the same page or open a new page. I am using a datagrid, how do I make this work? or should I use other component like table.
Please helpIf you have unique Identifier for the Computerband table use it to create a hyperlink column in the datagrid. then pass the id as querystring. During the postback event read the Id get the details of the brand form from the id and then you can display that in formation in a panel below this grid.
Note;
1. AutoGenerateColumns property must be set to False
2. Manually Create DataGrid columns including the hyperlink column
Ex:
<asp:DataGrid id="dg1" AutoGenerateColumns="False" runat="server">
<asp:HyperLinkColumn Headertext="Brand Id" DataTextField="BrandId" DataNavigationUrlField="BrandId" DataNavigationUrlFormatString="ComputerBrands.aspx?brandId={0}" />
<asp:BoundColumn DataField="ComputerBrandName" HeaderText="Brand Name"/>
<!-- .... add other columns -->
</asp:DataGrid
Thanks
Thank you Jay.
I still have som problem, I create a procedure that reads
Create Proc GetComputerID
@.ComputerID int
as
Select Computer,Price,CPU from Computers
Where ComputerID = @.ComputerID
I do not know where to pass the parameter in the grid, and I could not type computerID={0}
vb.net would not even allow me to run the application
I removed the where claus from my statement. But when I click on the hyperlink, nothing happens.
Here is the ASP code:
<asp:HyperLinkColumn Text="Computer" Target="_self" DataNavigateUrlField="ComputerID" DataNavigateUrlFormatString="UsedComputer.aspx?ComputerId={0}"
DataTextField="Computer" HeaderText="Computer" NavigateUrl="Computer"></asp:HyperLinkColumn>
<asp:BoundColumn DataField="Price" HeaderText="Price"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="ComputerID" HeaderText="ComputerID"></asp:BoundColumn>
</Columns>