|
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....
|
|
|
|
|
I do it this way
App = New Excel.Application()
Doc = App.Workbooks.Add
Sheet = Doc.Sheets(1)
Sheet.Range("J1").AutoFormat()
|
|
|
|
|
What is that Doc?
cud u tell me........
|
|
|
|
|
Hi friend,
Am working with C#(windows form)....
Cud u explain ur answer in C#?
thanx..
|
|
|
|
|
Search MSDN and Google for MS Office PIA.
|
|
|
|
|
hi mahi
Please try this, u can get export the records into excel.
Response.Clear();
Response.Charset = "";
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
Response.ContentType = "application/vnd.ms-excel"; System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
DataGrid dGrid[object]= new DataGrid();
dGrid.DataSource = name[class name].GetAllDetails(); dGrid.HeaderStyle.Font.Bold = true;
dGrid.DataBind();
dGrid.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
Bye
Naren
|
|
|
|
|
Hi naren,
i can export datas to excel..but i could nt define the datatype for these datas at runtime..thts the problem..
Moreover,am working with windows form with c#...
Cud anyone tell me the solution...
Thanx.......
|
|
|
|
|
Dear All,
I need to open a popup on the click of another popup here popup does not refer to popup window. This is on urgent basis.
Regards
Bipin
|
|
|
|
|
Hi,
I've some issues using property grid features, more specifically removing properties from the propertyGrid's selected object.
I want to edit the properties of the class at runtime, and dynamically remove some of them depending on some criteria. The attribute [Browsable(false)] does
not do what I need since it does not allow me to dynamically select what to remove, and invoking Properties.Remove in the component.PreFilterProperties method
is more what I'm looking for.
Unfortunately, and contrary to all the msdn's articles I've read on the subject, what I'm doing is not working as expected.
Here is a snippet to illustrate my point :
--------------------------------
entity = new Entity();<br />
entity.MyValue = "Hello world !";<br />
propertyGrid1.SelectedObject = entity;<br />
<br />
[Designer(typeof(Entity.EntityDesigner))]<br />
public class Entity : Component<br />
{<br />
public Entity()<br />
{<br />
}<br />
<br />
private string myValue;<br />
public string MyValue<br />
{<br />
set { myValue = value; }<br />
get { return myValue; }<br />
}<br />
<br />
public class EntityDesigner : Component<br />
{<br />
public EntityDesigner()<br />
{<br />
}<br />
<br />
protected override void PreFilterProperties( IDictionary Properties )<br />
{<br />
base.PreFilterProperties( Properties );<br />
Properties.Remove("MyValue");<br />
}<br />
}<br />
}
--------------------------------
The 'entity' class is never instantiated, and I suspect this is because it will only be done at design-time and not runtime,
could you confirm this ? Or am I missing something else ?
Thanks for the help,
Julien
|
|
|
|
|
|
Oups sorry about that, propertyGrid1 is a System.Windows.Forms.PropertyGrid control.
|
|
|
|
|
I loaded an image into a PictureBox control. But next time I want to unload it. How can I do that? Thanks!
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
if(pictureBox1.Image != null)
{
pictureBox1.Image.Dispose();
pictureBox1.Image = null;
}
|
|
|
|