|
I agree 100% with the constants approach for column names, we do that all the time here and has paid of on numerous occasions. We also do it for the table names.
It decouples you from Database especially for column name changes (just change constant literal) as well as makes the code much more readable.
|
|
|
|
|
hi, every one i get this exception that i couldnot come up with a solution. reading severla forum i made sure that all dll file are copied but still i get the error. any help plz point out.
System.Web.HttpException: Exception of type System.Web.HttpException was
thrown. ---> System.IO.FileNotFoundException: ...get_aspx_ver.aspx
|
|
|
|
|
You might have copied the DLL's but it looks like you missed out that aspx file
|
|
|
|
|
Hi Members,
Plz tell me how to encrypt/decrypt a string in c sharp.net using cryptography namespace.
thanks n Regards ,
Ahmad
ahmad.osama1984@gmail.com
|
|
|
|
|
You should use CryptoStream class. Click here[^].
Regards
|
|
|
|
|
|
Hi All,
Facing a peculiar problem.
I have MajicAjax implemented in my web page & the code runs perfect(My M/c's OS - Win 2000 Professional),whereas on the Tester's M/C it gives me script library '/AjaxCallObject.js' error on loading the same page(Tester's OS - Win XP). Furthermore, this problem persists only in some selective M/c's running on Win XP. Found some useful sites & tried the same but with no success.
Can anyone plz help asap...
Thanks in advance.
Yogesh J.
|
|
|
|
|
multi select list box coding using mysql stored procedure
|
|
|
|
|
I'm writing a program in C# 2005 Express and one of its functions is to scan the hard drives of the computer for specific files.
However, due to the diversity of the machines this program will run on, I cannot guarantee the drive letters for each hard drive.
Is there any way I can find the available drives so I can limit and speed up my scan?
I know I could use HKLM>Software>Microsoft>Windows>CurrentVersion>Explorer>MountPoints2
to find what drives are there.... but that doesn't distinguish between drive types (Hard Drive, Floppy Drie, CD Drive).
And help would be greatly appreciated.
------------------------
using System.People;
Person me = new Person();
me.Certifications = null;
me.Experience = little;
me.WantsToLearn = true;
me.InSchool = true;
me.AskQuestions("C# .NET 2003");
|
|
|
|
|
System.Environment.GetLogicalDrives()
« Superman »
|
|
|
|
|
Ha.
Thanks.
I can use that with System.IO.DriveInfo to get what I need.
That's what I love about CodeProject... response within a half hour.
------------------------
using System.People;
Person me = new Person();
me.Certifications = null;
me.Experience = little;
me.WantsToLearn = true;
me.InSchool = true;
me.AskQuestions("C# .NET 2003");
|
|
|
|
|
plz help me i have made Window Applcation and i want to save the exe in Startup. how it is possible
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wli
|
|
|
|
|
Sanjib Raj wrote: Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wli
sanjit, there are so many other ways to memorize your email id. This looks really awkward. Please remove them from your signature.
Sanjib Raj wrote: plz help me i have made Window Applcation and i want to save the exe in Startup. how it is possible
The simple way is to create a shortcut to theStart Menu\Programs\Startup folder
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Hi,
If you want your programme in the start up than put the path in the registry for startup..
nishu
|
|
|
|
|
Dear all.
i am making web application using asp.net and C#(Visual studio 2005). i have listbox(with multi select option) on web form. I am able to capture data through loop. now i want to know how i can place this loop data into single statement for insert statement.i am using prepared statement that is my insert query is
"insert into agentmst(agentid,agentname,agentservice1,agentservice2,agentservice3,agentservice4,agentservice5,branchid,acreatedby,acreated,Ipadd) values(@aId,@aname,@serv1,@serv2,@serv3,@serv4,@serv5,@branchid,@crby,getdate(),@ip)";
(i am ristricted myselef to atmost five listbox option).now i am populating listbox option as
parm3.ParameterName = "@serv1";
parm3.Value = names[0];
parm4.ParameterName = "@serv2";
parm4.Value = names[1];
parm5.ParameterName = "@serv3";
parm5.Value = names[2];
parm6.ParameterName = "@serv4";
parm6.Value = names[3];
parm7.ParameterName = "@serv5";
parm7.Value = names[4];
now i am able to fetch listbox data correctly through loop as
for (int i = 0; i < listBox1.Items.Count; i++)
{
if (listBox1.Items[i].Selected == true)
{
for (int j = 1; j < 7; j++)
{
names[j] = listBox1.Items[i].Text;
Response.Write(names[j]);
break;
}
}
}
Now my question is how i can use this in insert statment. Please Guide me.
Where i am going wrong.
Any one knowing Please guide me.
Thanks
regards
imran khan
|
|
|
|
|
remember that the listbox in this powerfull lenguage c#, have many components that you can use in your project, for intance, only you need load the information in a datatable for example, and then tell to the listbox, and you can use too a combobox, the properties datasource that you load from a datatable:
public void LoadDatatable(ref system.data.datatable some)
{
cmd = new SqlCommand("yourStoredProcedureOrStatement",con);
cmd.CommandType = CommandType.StoredProcedure;
try
{
adapt = new SqlDataAdapter(cmd);
adapt.Fill(some);
}
catch(Exception ex){throw ex;}
finally
{
con.Close();
}
}
system.data.datatable p=new system.data.datatable();
LoadDatatable(ref p);
and after all this, only rest that you tell to the combobox or listbox, anyone that the properties DataSource = p;
and the way too show the thinks that was load:
ListBox.DataSource = p;
ListBox.DisplayMember = "The name of the thinks that you like show";
ListBox.ValueMember = "A id, if exist, only to give more handle to this control";
ok I hope that this thinks help you....
one think: Forgive me by my English ok, because in my contry this idioms i'snt speak a lot....
if you wanna another answer o whatever please write me
e-mail:joelintel@gmail.com
|
|
|
|
|
Thanks for reply.
But i already filled the listbox in page load event. Now On Save Button, i have to get those selected item in the listbox. and add to the parameter.
My quetion is how can i assaign these selected option values to parameter used.
regards
imran khan
|
|
|
|
|
sorry for the long time, but I can'nt seat before my pc in some many hours, ok your question is simple
the best mode to give you the answer is with a example....
if you have a listbox and in them properties selection mode you put "MultiSimple", and you do a correct add of the elements to show in run time, you selected the item that you need to save in your DB maybe using that
int [] a;
int p=0;
p=this.listBox1 .SelectedIndices.Count ;
a=new int[p];
for (int i = 0;i < p;i++)
a[i] = this.listBox1 .SelectedIndices [i];
and in the array "a" you have all the position that be selected, the rest i think you know, make a loop wih that and with the class SqlParameter add all this position or the name of the item under this position....
is a plaesure help you, if you have any question tell me ok....
|
|
|
|
|
hi, in the last reply, I show you how you can select the rows in a listbox, but how you no tell my any more, I expect that you stand all....
regards
sno-1
|
|
|
|
|
sir
i want multiselect listbox how to save in database please coding and query
|
|
|
|
|
i have made a system tray in WindowApplication C# i want to run it when System Starts as Sql Server Service manager Starts or System Tray will start automatically, plz help me?
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wli
|
|
|
|
|
Sanjib Raj wrote: Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wlinktech.com
Sanjit.rajbanshi@wli
I've sent the answer to your Sanjit.rajbanshi@wli id. Good luck.
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Hi all,
please can anyone explain me what r saf and unsafe keywords?
thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/ms228628.aspx[^]
Instead of wasting yyour time in the forum for nearly around three hours, u can as well search such small things in google to save time!!!
All the Best
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
hi chravisankar,
thanks for the reply. generally i Use google & msdn2.microsoft.com for the subject. i am learning .net all by myself.
sometimes i am confused when i accross the new terms. i post the query in this forum, when i am frustated to understand the subject by myself and hoping that someone can answer my question in a simple way.
anyway thanks once again for responding to my question
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|