|
Hi All,
Is there any way by which we can know which particular arrangement of
files and folders is being selected by a user in a particualr folder
view.I mean that among the five
options(Name,Size,Type,Modified,Attributes) which we can chose when we
chose 'Arrange Icons By' options which one is being selected.Any
suggestions will be greatly appreciated.Thanks in Advance.
Rakesh
|
|
|
|
|
Hi friends,
I am currently working on an ASP.NET project using C# and i have one issue. Does anyone know how to trigger a javascript anywhere in C# code.
eg : if(conditon)
trigger javascript
Can you please help me on this.Thank you
Krugger
The Truth is out there...
|
|
|
|
|
You can add javascript using the Page.RegisterStartupScript method.
Example:
Page.RegisterStartupScript("ShowAnswer", "<script type=\"text/javascript\">alert('42');</script>");
---
b { font-weight: normal; }
|
|
|
|
|
Thanks ---
b { font-weight: normal; }
I came across this but was unsure whether the script will run immediately.
Can i do something like this (see below) to ensure that the Javascript ShowAnswer is fired only where MyBool is true?
if(MyBool)
Page.RegisterStartupScript("ShowAnswer", "alert('42');");
Krugger
The truth is out there..
|
|
|
|
|
The code is placed just before the tag, so it will be run while the page is loading in the browser.
If you don't execute the RegisterStartupScript call, the code is of course not added to the page.
---
b { font-weight: normal; }
|
|
|
|
|
hi
I have created a class where I am creating custom control for my web page the problem is that i am getting error like this
The type or namespace name 'UI' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference?
in the using System.Web.UI;
using System.Web.UI.WebControls;
what is the actual cause for this error ? and how i can rectify it I am not good in C#
thanks in advance
kal13na13
|
|
|
|
|
kal13na13 wrote: are you missing an assembly reference?
So... Are you?
See the references section of your project, is there a System.Web reference in there? If not add it by right clicking references, select "Add Reference..." Find "System.Web.dll" in the list (in the .NET Tab), double click it then press okay.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
|
Hello ,
I am a beginner in c#.net, currently i am working on c#.net windows forms.
My problem is i want to call a button event of let's say form1 from form2.
what i did is make an object of form1 and call that button event, but it's not working.
I need your help immediately pls give me ur idea,
alex.
Help me
|
|
|
|
|
SOunds like your application architecture isn't right. You shouldn't be doing this. The button event on form one should be activated only from the button itself. Nothing else should call it.
Some ideas:
Refactor the code for the event into a separate method and call that method from the other form.
Refactor the code for the events into a controller class and have the event handlers call into the controller. The code in the form2 would also call into the controller instead of directly to the form1.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
yes. i think the same as colin.
But if you want to do this you might declare the event of this button as public instead of private.
But what you are trying to do isnt right.
|
|
|
|
|
Hi, I'm building a text file filter.
I need to verify if a string is part of another string, for example: I wanto to find if the word "text" is part of a string.
I'm writing a class inherited by String class...is it the correct choice or already exists a class to do this?
Sorry for my bad english;P
|
|
|
|
|
string myString = "Hello Text World";<br />
<br />
int idx = myString.IndexOf("Text");<br />
<br />
bool myStringContainsText = (idx>-1);
|
|
|
|
|
....I'm a stupid!!! thanks!!!
|
|
|
|
|
Hello,
Anyone know how to bind a CheckedListBox to a table so that every checked item generates a new row in another table?
DataSource and DataMember do not seem to work
Thanks in advance
|
|
|
|
|
hi,
i need to know how to run crystal reports on a machine that dosn't have .Net full pakage ,
the case i have a program that have many reports that i need it to be installed on machine that have .Net Framework but the crystal reports dosn't run telling me that the keycodeV2.dll not found or not the correct version
so can any one help me ???
Ramez Ernest
|
|
|
|
|
Hello,
The error you get on the machine with the .Net framework has a solution.
What you need is to register your copy of Crystal Reports .Net at Crystal, this is free, they will send you an e-mail with a registration code. On your Visual Studio Project you must choose your Crystal Reports Viewer Control a write the Registration Code, then rebuild the solution and copy the application to the machine with the .Net Framework.
On the Crystal Reports support site (I have no idea of the URL is ) you can find a document that explains step by step the distribution of an application that uses Crystal Reposts .Net.
Hope this will be helpfull.
Rui Sousa
|
|
|
|
|
I've can into a problem. I have som "old" code made in VS2003. It's an application which queries some information on the internet, which is used in the application.
In VS2003 it was able to close all the open connections to the internet. BUT after VS2005 has compiled the exe, the connection stays open? and therefore, windows cannot shut down while the program is running.
Any help would be appreciated!!
|
|
|
|
|
Hello dear all
i am facing a problem in crystal report. that crystal report is working well in windows 200 server but not working in windows XP. i have created one cystal report in .NET C#. this is giving error when i open this crystal report in windows XP operating system. it display a one dilaog and get user name and password. in my sql server 2000 i have set SQL Server Authentication and when i open that report then it display a dialog. this dialog does not display in windows 2000 operating system. i use same SQL Server Authentication in SQL Server 2000.
please help what can i do for this issue
Priyank Gupta
|
|
|
|
|
Hello,
Is there any way to manipulate the password on a sqlclient connection?
something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string.
I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain.
Any ideas will be appreciated.
Thanks.
|
|
|
|
|
You can do anything to the connection string before you use it to connect to the database, it's just an ordinary string.
I suggest that you put a marker in the connection string, for an example a tag like [pwd], then replace that tag with the password.
---
b { font-weight: normal; }
|
|
|
|
|
You can write it in a config file ofcourse. Then you can get from there to your connection string. But you know that it is not secure.
Maybe it is not so important for you..
If it is important, you can enchrypt it. this means a lot of work
|
|
|
|
|
Hello Guys,
In one of my page i m using DataGrid i need to add picture next to the header for which i m doing sorting. But i m not able to do so.
Thanks
|
|
|
|
|
Hai Bipin,
I had similar requirement for my project. What I did was subclass DataGrid and in the Overridden paint method, I would know the clip rectangle or the bounds of the cell. In the bounds I would call drawImage method and draw the Image in the right hand side/ left hand side of the cell based of the text alignment of the cell
Here is a part of what I did.....in Paint Method
// xpos basically keeps track of start position of each column.
int xpos = 0;
for (int i = 0; i < TableStyle.GridColumnStyles.Count; i++)
{
DataGridColumnStyle gc = TableStyle.GridColumnStyles[i]);
DrawSortableColumn(TableStyle.GridColumnStyles[i], xPos , e);
xPos += TableStyle.GridColumnStyles[i].Width;
}
// image drawing code
public void DrawSortableColumn()
{
int scrollValue = this.HorizScrollBar.Value; /* need to draw correctly when there is a horizontal scrool bar appearing */
if (cs.Alignment == HorizontalAlignment.Left)
{
e.Graphics.DrawImage(img, xPos + textWidth + 10 - scrollValue , 1, _ImageWidth, _ImageHeight);
}
else
{
e.Graphics.DrawImage(img, xPos + cs.Width - textWidth - 20 - scrollValue, 1, _ImageWidth, _ImageHeight);
}
}
Hope this helps
thanks,
VPMahank
|
|
|
|
|
Hi ,
i went hro an article here at
http://www.codeproject.com/csharp/Export.asp[^]
There the dynamic creation of an excel sheet has been coded...
But my question is,Is it possible to define the datatypes of each column we create in the excel sheet?
Kindly help...Thanx....
|
|
|
|