|
yep just figured that out thanks just couldnt get the right syntax
cheersd!
We are not a Code Charity
|
|
|
|
|
Copy and paste is a design error
|
|
|
|
|
Hi,
In my aspx page, I have 3 tabs. tab1, Ownership, Location.
first tab: tab1 entity shows the fields some x, y, z.
Second tab: Ownership: this owner of the above business may be some xxx company, and person.
Ownership tab display details like the below:
Owner Type: dropdownlist: Person or business
if person is selected take them to the Person.aspx page, there he can add the person details like name,ssn, firstname, lastname, middlename,...
If Business is selected, take them to another page, there he can enter, details regarding the business.
The Ownership may contain up to x number of businesses(each buisness have details), y number of persons(each person have the above details).
Third tab: Location: stores the physical address, mailing address.
Now, I have to define the classes in business layer for the above scenario:
a) tab1 class
b) Defined one class i.e business contain the details of the busienss. Person class having the fields for name, ssn, lastname, middle name.
c) defined class Address: having the fields, properties for street address, city, state, country, zipcode.
They can have multiple businesses, persons, adresses.
Now defined another class like the below:
Class Application //this class is to store the above details of 3 tabs.
{
#region fields
//Tab1 entity
tab1 t;
//Business class entities
Collection<Business> bus;
//Person class entities
Collection<Person> Persons;
//Address tab
Collection<Address> PhysicalAddress;
Collection<Address> MailingAddress;
}
I am using the collection to store the multiple values of the class objects. So In presentation layer I can bind the collection to GridView.
Could anyone specify above approach is good enough? Any other areas I have to take care of?
Thanks in advance.
|
|
|
|
|
I want to show yahoo messenger,rediff bol,window messenger 's login window on my custom web page like http://www.meebo.com have shown it.
|
|
|
|
|
I am doing an ASP .NET application, which is almost complete. I hosted it into IIS server and the pages are accessed from my machine. The other users in intranet can access the pages now. But when anyone is trying to login to the website, the application is throwing an error saying SQL Connection Error
The error is as follows :
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact
that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces,
error: 25 - Connection string is not valid)
The connection string is declared in Web.Config file and hope it works fine....
Can someone please sort out this issue and help me...
Thanks in advance...
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Is your SQL server on other server ? As the error says, default SQL server doesn't allow remote connection. You can enable this by going into "SQL Server Management Studio". If you have firewall running, add SQL server port to allowed list.
|
|
|
|
|
No firewalls are installed and not running on the other machine from where i am trying to access the Database.
The connection string is some thing like thing :
<add name="myconn" connectionstring="server=192.168.2.54;Initial Catalog=LG;User ID=sa;pwd=sa123" providername="System.Data.SqlClient" />
Is that the correct way of using it....
At times it throws another error saying :
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Timeout expired.
The timeout period elapsed prior to completion of the operation or
the server is not responding.
Can anyone please help me...
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
The timeout error message shows because it cant establish the connection and therefore just gives up after 60 seconds or so.
You need to check if remote connection to the server is allowed.
We are not a Code Charity
|
|
|
|
|
Can you specify how can check whether It allows remote connections.
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Ok- have you tried to connect from a SQL query browser to this server ?
|
|
|
|
|
Add a gridview to your form and try to bind it at design time.
If there is no error use the same connection string, That is automatically generated.
Copy and paste is a design error
|
|
|
|
|
The pages are working fine in my machine. There are Gridview and other data binded controls in the application. But when accessing from another machine in intranet, it is throwing all these errors. Please Help me
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
|
I am using SQL Server 2000....
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
But in your first post says,
sajan ss wrote: When connecting to SQL Server 2005, this failure may be caused by the fact
You need to enable TCP/IP on MS SQL side.
Right click on SQL server in SQL Server enterprise manager. Tab "General".
Button "Network Configuration"
Make sure you have TCP/IP in enabled protocols.
Also make sure that if there is any firewall between Web server and SQL then
it's open. Also try to ping the SQL server from Web server. Sometimes web
server can not resolve the name of the SQL server due to the network
configuration. Fix it or use IP address.
Copy and paste is a design error
|
|
|
|
|
Thanks a lot.
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Are you able to connect?
Copy and paste is a design error
|
|
|
|
|
how create textbox dynamically and how to give a unique id to these textboxs.
my code is:
<% if (Request.Form["sacc1"]== "0" )
{ %>
<%for (int i = 1; i <= int.Parse(Request.Form["schild"]); i++)
{%>
<table style="width: 664px">
<tr>
<td colspan="2" style="height: 22px">
<span style="font-size: 10pt; font-family: Verdana"><strong>child
</strong>
<asp:RadioButton
ID="sdaughter" runat="server" Text="Daughter " Width="135px" GroupName="child" /> <asp:RadioButton
ID="sson" runat="server" Text="Son" GroupName="child" />
</span>
</td>
</tr>
<tr>
<td style="width: 268px">
<span style="font-size: 10pt; font-family: Verdana">
Name of the daughter/son:</span></td>
<td style="width: 123px">
<asp:TextBox ID="cnameofthedau" runat="server" ></asp:TextBox></td>
</tr>
<tr>
<td style="width: 268px">
<span style="font-size: 10pt; font-family: Verdana">Date of issue:</span></td>
<td style="width: 123px">
<asp:TextBox ID="cdateofissue" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 268px; height: 21px;">
<span style="font-size: 10pt; font-family: Verdana">
Place of issue:</span></td>
<td style="width: 123px; height: 21px;">
<asp:TextBox ID="cplaceofissue" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 268px">
<span style="font-size: 10pt; font-family: Verdana">
Date of expiry:</span></td>
<td style="width: 123px">
<asp:TextBox ID="cdateofexpiry" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 268px">
<span style="font-size: 10pt; font-family: Verdana">
Date of birth:</span></td>
<td style="width: 123px">
<asp:TextBox ID="cdateofbirth" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 268px">
<span style="font-size: 10pt; font-family: Verdana">
Seat preference:</span></td>
<td style="width: 123px">
<asp:TextBox ID="cseat" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 268px">
<span style="font-size: 10pt; font-family: Verdana">
Meal preference:</span></td>
<td style="width: 123px">
<asp:TextBox ID="cmeal" runat="server"></asp:TextBox></td>
</tr>
<tr>
in this code we have 8 textbox and generate another 8 textbox if user select from dropdown box 2.so now these textbox should have unique id. how can i do. plz reply soon.
|
|
|
|
|
gaurav mangal wrote:so now these textbox should have unique id. how can i do. plz reply soon.
try in this way if this work
<asp:TextBox ID='<% "cplaceofissue" + i %>' runat="server" ....
But better way to create them dynamically in code behind page.
regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks Imran
for giving me the idea. but its not working.will you suggest me other code.i think it is little away from the right way.it gives it is not a valid identifier error.plz give me the idea at aspx page.how to incremwnt id .as i used it at code behind also but the id remain same.
if (!IsPostBack)
{
int k = Convert.ToInt32(s3);
for (int j = 1; j <= k; j++ )
{
for (int i = 1; i <= 4; i++)
{
TextBox TextBox1 = new TextBox();
TextBox1.ID = "stext" + i.ToString();
Panel1.Controls.Add(TextBox1);
}
}
}
in this condition id remain same .so what should i do.
in asp it works like that
|
|
|
|
|
Plz suggest me imram its very urgent .
'<% "cplaceofissue" + i %>;'
what should use in place of this.
regards
|
|
|
|
|
Pathan is right why you are not using code behind file?
Copy and paste is a design error
|
|
|
|
|
We have hosted two applications in Win 2003-IIS 6.0. We have created two websites parallel to 'Default Web site'. The domain names for both the sites are different and both the sites use forms authentication. Please help me as to how we can implement SSO between these two applications. We have the idea of implementing SSO within the same domains.
|
|
|
|
|
|
Thanks for the response.
It talks about applications in the same domain. My case the domains will be entirely different.
|
|
|
|