|
Hi Yusuf,
Thanks for reply.
I know about web.config , but think is that there is website like shopping site, www.shopping.com
but this website may have multiple database. DB-1, DB-2. But I don't know the database name and login details of database, its come through another database, After getting dbnam, userid, pwd I create connection string in class file. I will receive that value whole site.
did you get my point
|
|
|
|
|
Why don't you just store the connection string in a session variable, then it will be associated with each user and remain with them whilst they are logged in?
Clean code is the key to happiness.
|
|
|
|
|
vnsraj wrote: But my problem is that when another user login the first user connection string was change to last user connection string,
Can you please explain your business requirement, I am not able to understand that why connection of database changed based on user.
modified on Friday, May 8, 2009 1:13 AM
|
|
|
|
|
Hi, try to check again your connstring: www.connectionstrings.com
Hope this one can help.
Thanks
Hi, Please select Good Question if my answer are fit to your Question.
|
|
|
|
|
Storing the connstring to Session is a good way so each user will hold his own connstring. Static variable is used at the Appliction level, which leads to your problem.
Welcome to www.softwaretree.net!
This website is generated completely by static html pages transforming technology.
You can find many excellent audio/video tools there!
|
|
|
|
|
hi
the connection string will change to the last user why?because you
put it in static variable it's means that this variable is shared for all users of application .so when any user assign it,it has only the last value. for example if we have static variable called x.the first user assign it by 5 .the second user assign it by 10. it becomes 10 not 5 . don't use static variable in this case.
Essam
|
|
|
|
|
I have two treeviews in my page. I want to move the selected nodes from left to right.For this, I have added checkboxes.
Now the issues are:
1) Assuming that I have added some nodes to the right hand side while clicking on "Add>>" button. Now again, the user selected some other nodes. I don't want to remove which is already added in the right hand side, i jus want to append it? How should I do that?
2)If the user clicks on "Remove<<", I want to move the selected nodesfrom right and readded to lefthand side.
Anyone has any idea how to implement this? Any links for the code is really helpful.
Thanks in advance.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Why don't you use ListBox-objects?
You can select multiple, in the OnClick event of the add>> button you can check for all ListItem in ListBox.Items. And if ListItem.Checked = true...well move the thing to ListBox2.Add(ListItem); and ListBox.Remove(ListItem);
Basically that's all.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I am creating the object of the class having textbox and dropdownlist on button click event but while postback the object is losing its scope .i want to access this object on another button click .
How to access this object
|
|
|
|
|
what do you want? Do you have any code to explain the problem?
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
this is the class whose object i want to access
public class Class1
{
private TextBox txtname;
public TextBox Txtname
{
get
{
return txtname;
}
set
{
txtname = value;
}
}
}
here i m creating the object of this class on btnSave click and trying to access this object on btnGet click.....
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnsave_Click(object sender, EventArgs e)
{
Class1 obj = new Class1();
obj.Txtname = new TextBox();
obj.Txtname.Text = "mridul vishnoi";
obj.Txtname.Visible = true;
Page.Form.Controls.Add(obj.Txtname);
}
protected void btnGet_Click(object sender, EventArgs e)
{
}
|
|
|
|
|
Hi, to all
I have developed a project with asp.net 2.0. And there is a download link on books, i want to store how many times user download my books.
|
|
|
|
|
What I do is this.
My user selects a filename. To download that file hey must press a button-object.
In the OnClick Event I Check:
- Does the file Exist via FileInfo
FileInfo fi = new FileInfo(DownLoadFileName);
- FileSize larger then 0
if (fi.Length > 0)
{
arrParameter = new SqlParameter[3];
arrParameter[0] = new SqlParameter("@secUserID", Convert.ToInt32(Session["USERID"]));
arrParameter[1] = new SqlParameter("@reportName", Page.Title);
arrParameter[2] = new SqlParameter("@DownloadedFile", txtExcelFile.Text);
SyconosServer.dataBaseActieNonQuery("SE_InsDownload", arrParameter, String.Empty, "SesameNET31");
Response.Redirect(@"~/Export/DownLoadFile.aspx", false);
}
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Good Afternoon All
I have a Control that looks like this
http://www.tiyaneproperties.co.za/fading_Control.JPG[^]
and this Control looks differently from versions of Internet explorer. In 7 and up it shows are the links shows you and in internet explorer 6 it shows the whole of it , if the list grows, it create scroll bars
Questions
What is the Reason to that ?
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I too find this kind of problem but bwn mozila and IE.
|
|
|
|
|
Were you able to Find a Solution ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
IE 6 behaves differently to IE 7 and above and Mozilla based browsers in respect to block-level element heights. In order to resolve your issue you will need to specify browser specific CSS to cope such as:
/* Style to target IE 6 */
.styleForListWrapper
{
height: 300px;
}
/* Override styles for IE 7 / Mozilla */
html>body .styleForListWrapper
{
height: auto;
min-height: 300px;
}
IE 6 allows block level elements to grow with their content whereas other browsers do not. Therefore specifying the min-hegith property will allow these other browsers to grow as required.
Hope this helps...
Clean code is the key to happiness.
|
|
|
|
|
Thank you Very much. i will try it
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Good Morning newc1
Thank you very much for your help.
It worked.
Vuyiswa Maseko
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I have no clue how to start with credit card validation.
can anybody help?
|
|
|
|
|
Here you go Google[^]
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
|
hi !
i want to enter in text box only capital A to Z and number only, in web page for that i want java script .
|
|
|
|
|
Do you want a validator?? If so use regex to match the textbox value as follows...
<script language="javascript" type="text/javascript">
function ToUpper(ctrl)
{
var t = ctrl.value;
var expr = /^[A-Z0-9]+$/;
if(expr.test(t))
alert('passed');
else
{
alert('failed');
return false;
}
}
</script>
<asp:TextBox ID="TextBox1" onkeyup="ToUpper(this)" runat="server"></asp:TextBox>
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi friends
I have source code ,its perfectly running internet explorer but an apple safari browser its not running ...why??
Thanks
|
|
|
|