|
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.
|
|
|
|
|
i want put a requierd field validator control in my form but not in aspx form . i want create it with programing . can anybody tell me how can i do this? and where should i write my code. in pageload() or other..
|
|
|
|
|
do you you mean a html form without "run at server"?
by the way i think checking on
onsubmit should be better
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
sorry
<form name="form1" method="post" action="somepage" onsubmit="javascript:return my_OnSubmit();"></form>
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
no i mean in c#.net with programing
|
|
|
|
|
Why do you want to create validators on the fly?
Can you please explain the situation?
Copy and paste is a design error
|
|
|
|
|
i use it in a sharepoint webpart and i dont have a desine form (aspx form) just i have cs form and i should define the controls with c#.net in cs file
|
|
|
|
|
i don't know anything about share point but if you mean using a RequiredFieldValidaitor Programmaticalmy :
you have some options, one of them is this :
in Page_Init() add validiator
RequiredFieldValidator rfv = new RequiredFieldValidator();
rfv.ControlToValidate = "TextBox1";
rfv.ErrorMessage = "fill it!";
this.form1.Controls.Add(rfv);
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
This is what you want, good work subai
We are not a Code Charity
|
|
|
|
|
You need to create an object of requiredFiledValidator control and need to set all required properties like as ControlToValidate,ErrorMessage,Display etc and add it into Control object.
regards
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
i wrote:
protected void Page_Load(object sender, EventArgs e)
{
RequiredFieldValidator fv = new RequiredFieldValidator();
fv.ControlToValidate = "TextBox1";
fv.ErrorMessage = "*";
fv.EnableViewState = true;
fv.EnableClientScript = true;
fv.Display = ValidatorDisplay.Static;
fv.EnableTheming = true;
fv.ID="fv1";
fv.EnableViewState = true;
}
but its not work
|
|
|
|
|
ptvce wrote: but its not work
Yeah.You have to add this control on the page. tell me where is your TextBox control if you do not have an .aspx page
regards
khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
i create a webpart project . i dont know u work with sharepoint webpart or no but i create my controls in cs form and add my webpart to sharepoint
when i add this.Controls.Add(fv) it has error with this message:
Control 'fv1' of type 'RequiredFieldValidator' must be placed inside a form tag with runat=server.
|
|
|
|
|
I am asking about TextBox control.
Where is your TextBox control? Do not you put requiredFieldValidator control with textBox?
If you do not then put one panel control and add validator control into the panel.
Or search in google.
here I got sample code for webpart project.
Check It out.Click here title="New Window">^]
please don't forget to vote on the post that helped you.
|
|
|
|
|
iam having a check box list where iam assing dt to the checkbox list using
ChklistCnt.DataSource = dt
ChklistCnt.DataTextField = "Name"
ChklistCnt.DataValueField = "Name"
ChklistCnt.DataBind() like this
iam not getting the selected check box values. how can i get the selected vlaues of the check box
|
|
|
|