|
I found the answer in query itself sandeep... just refer it
SELECT REPLACE(CONVERT(VARCHAR, column_name, 106), ' ', '-') as "column 1" from tbl_name
Take care...
|
|
|
|
|
hai,
i m using ASP.NET with C# (.net 2005, 2.0 framework)
here i create a directory named "A" and some files are in this folder (say... A1,A2).
and outside of "A" folder there are some files (out1,out2).
how can i specify the path to fetch the file from A1 to out1???
how to achieve it?
help me - KARAN
|
|
|
|
|
hi....
you can achieve that by using namespaces.
Give same namespace for all the pages that u want to access.
Regards,
Sandeep Kumar.V
|
|
|
|
|
kindly could u give me an example, so that i can understand clearly.
And also can u specify by means of the example which i have posted?.
thank you...
|
|
|
|
|
Hi...
for the file A1 which is in the folder suppose give namespace as
namespace TestNamespace
{
public class A1
{
............
}
}
for the file which is out side the folder give same name space like...
namespace TestNamespace
{
Public class out1
{
}
}
now if you want ot access any for the files you can directly call that cllas name in your class file....
like....
namespace TestNamespace
{
Publc class out2
{
out1 o=new out1();
A1 a=new A1();
}
}
Hope with this you can get some thing......
Regards,
Sandeep Kumar.V
|
|
|
|
|
wow...... S sandeep.. i got it.. this is i needed.
and another clarification sandeep?
suppose my full path is : c:\inetpub\wwwroot\project\tet_pr.ascx
another file path is : c:\inetpub\wwwroot\project\output\file1.ascx
how to switch from one file to another by using the below statement?
int a;
if (a == 1)
this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("te_pr.ascx"));
else
this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("file1.ascx"));
help me .
thanks for understanding......... - KARAN
|
|
|
|
|
John Sundar wrote: this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("file1.ascx"));
i guess above code should be like below one......
this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("\output\file1.ascx"));
Regards,
Sandeep Kumar.V
|
|
|
|
|
Thanks sandeep.. to fetch the te_pr.ascx from file1.ascx???????????
how to achieve it?
|
|
|
|
|
give same namespace for both user controls then same as classes you can access them.....
Regards,
Sandeep Kumar.V
|
|
|
|
|
can u tel me with the example sandeep?? plz..
suppose my full path is : c:\inetpub\wwwroot\project\tet_pr.ascx
another file path is : c:\inetpub\wwwroot\project\output\file1.ascx
how to switch from "file1" to "tet_pr" while i m working in "file1.ascx"
int a;
if (a == 1)
this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("te_pr.ascx"));
else
this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("file1.ascx"));
help me .
thanks for understanding......... - KARAN
|
|
|
|
|
This seems incredibly nasty, but I'd say if you need to do this, your best bet is to set what path leads to a particular control, in your resources, and swap resource files as needed. As someone else said, odds are you need to name the classes the same if you want to be able to use them when you swap them out like this. OR a better idea again is to simply define an interface that the controls you're using will have in common and access them via that interface.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i have a gridview with a select link in first column. and i want when i select a row i get the select row values that are in cells. how can i do this . can anybody tell me please
|
|
|
|
|
Where do you want them, client side or server side ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
In your gridview use the OnSelectedIndexChanging-event
aspx:
OnSelectedIndexChanging="myGridiew_OSIC"
in code behind:
protected void myGridiew_OSIC(Object sender, GridViewSelectEventArgs e)
{
myGridView.SelectedIndex = e.NewSelectedIndex;
String Field1 = myGridView.Rows[e.NewSelectedIndex].Cells[0].Text;
etc...
myGridView.SelectedIndex = -1;
}
|
|
|
|
|
how can i retrive value of rich text box in html format because i want store this value in data base
plz suggest me
thanks........
krishna veer singh
|
|
|
|
|
There is no inbuilt rich textbox available for ASP.NET. Taking HTML depends on the control you are using.
|
|
|
|
|
I'm trying to work with Excel objects in C# for ASP .NET 2.0. I am receiving the following error:
System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC at Microsoft.Office.Interop.Excel.Sheets.Add(
I am trying to follow the article here but it is in Visual Basic. The .Add function does not include any parameters but in C#, it seems I must pass the 4 parameters. (Object before, object after, count, and object type).
The article for reference is at: Generating Excel Reports in ASP .NET 2.0[^]
Unfortunately, I will not be able to post any code, but does anyone know of any good articles on how to work with excel to generate spreadsheet that is generated from data and then the chart added in C#?
Thanks
|
|
|
|
|
Hi,
Can you give little more information? Are you sending the data which is in grid to excel file? If so, I have code which exports to .CSV file from a gridview...
If your question is the same, I can share the code for you.
Thanks...
|
|
|
|
|
Yes. My problem is the same. If possible, please share the code with me. My email id is abhisek.ch84@gmail.com.
|
|
|
|
|
Hi,
I am trying this for couple of days. But could not solve it.
I am calling a stored procedure (it has 3 I/P parameters) with command object and binding to a gridview.
One parameter takes multiple values (ex: 10,20,30) When I debug the application, all the values, its passing correctly.
(When I run the stored procedure in the back end, its giving all the rows)
But after binding to gridview, its displaying only the first value.
For example,
If I pass company as 120 and fund as 10,20,30 and date as 3/31/2008, the stored procedure is taking all the values. But when it displays in the grid it showing only the data of fund 10.
Please help me. how can I get the values in the grid.
Thank for all your help.
Vasini
|
|
|
|
|
call method DabaBind of GridView
GridView1.DataBind();
I Love SQL
|
|
|
|
|
Thanks for the reply. I have binded to the gridview. Its displaying the first value. I would like to display all the 3 or 4 ( how many I pass) in the grid.
Thanks again....
|
|
|
|
|
the values 10,20,30 which u give in parameter can it be stringed? like this 10+','+','+20+','+30
then probabbly u can get result which u want in gridview.
I Love SQL
|
|
|
|
|
I you dont show your stored procedure, i dont think someone is gona be able to figure it out
Alexei Rodriguez
|
|
|
|
|
hi
i m using asp.net and vb.net.How can i implement a clock in a page???
please help
thank you
|
|
|
|