|
I know about the formats.
However, this doesn't solve my problem, since I can't modify the entire application.
Thanks anyway.
Yaakov
|
|
|
|
|
hi
i write a web application with c#.
it has some pages and thir controls such as:
validators , datagrid , datalist with template column
and they have thir event handler functions.
the application works correctly on local.
{ my system: [windows 2003 server ]}
but when i upload it to the host server , the events dont work correctly.
------------
site address:http://siteavval.com/WebVDir/MainGrps.aspx
error message for:
javascript__doPostBack('MainGrpsList$_ctl0$LBGrpShr','')
|
|
|
|
|
Hi,
Here i m facing one problem with .net console application.I am having one solution (.net project) now due to our requirement we had made one dll out of that project and then from one another console application i had called that dll.Now problem is that when i am running that another project of console application which is having my project dll ,it is giving the error of system.componentmodel.win32 application after running my console application.
Now Main thing is that one some machine our same application is running without error and on some machine it is givign error which i had describe above so after searching i found that this is error due to .net security now can anybody know how to give right of user which allows my console applicaiton to run without error?
where and how to give rights to user so my application run without errors?
montu3377
|
|
|
|
|
Go into Control Panel, Administrative Tools, Microsoft .NET Framework wizards, Trust An Assembly, then specify your application and give it the necessary trust to run.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Lies of Our Fathers: A Must-Know About Lent
Judah Himango
|
|
|
|
|
in C++ i can pass a function a const reference to an object. i find this is normally a good idea, since it assures me that the function will not make any changes to the objects state.
is there an equivalent concept in C#? if i understand C# correctly all instances of objects are references and initial experiments show they are passed as modifiable references.
i am trying to create a tree of objects (representing the sub directories on a CD-ROM), so that i can say to each child "this is your parent", passing a constant reference to its parent in its constructor. a child cannot alter its parent, so i want to enforce this concept in the code.
i have found a C# article on modifier keywords which led me to discover that i can have a read only object. but putting readonly before the parameter type does not compile
if there is no such concept, how do people express the concept "remember this object, but you cannot modify it?"
zen is the art of being at one with the two'ness
|
|
|
|
|
There is no language support for const function parameters. For your case though, you can declare the parent field in the child class as readonly. That means that it can only be set in the constructor/field initializer. Like this
<br />
class Child : Node<br />
{<br />
private readonly Node parent;<br />
<br />
public Child(Node parent)<br />
{<br />
this.parent = parent;<br />
}<br />
public void SomeFunc()<br />
{<br />
parent = new Node(...);
}<br />
}<br />
Regards
Senthil
My Blog
|
|
|
|
|
Hi,
I import a C++ Dll in my C# application.
First I call from C# a C++ function and then I get
a result set from the dll.
The result is a array with 3 dimensions.
How can I get access this array in C#.
Please help me !
|
|
|
|
|
I need to get a new pixel color starting by a green color and another one over this blue semi-transparent at 50%.
I've readed some articles on this forum but i need just 2 lines of code not warking with whole bitmaps.
I know it is a very simple stuff, but i don't know how fuse or join two pixels getting another colored pixel.
i've tried with
myColor.R = Color.Green.R & Color.Blue.R
myColor.G = Color.Green.G & Color.Blue.G
myColor.B = Color.Green.B & Color.Blue.B
it works but it fuse full blue on green, i need to fuse semitransparent blue instead.
Please help me.
thanks
|
|
|
|
|
|
|
I was hoping other developers could give me some advice as to where to store my data! Previously I have always used classes to maintain information relating to the current process. If a background thread required additional information to process, I usually either passed the information in as a parameter or added properties to my thread class.
Recently I have become aware of CallContext and Thread.SetData. I am sure there are also other "places" that .Net provides for storing information relating to the current process/thread.
My question really is: could someone help me understand the scope and purpose of the different storage mechanisms provided by .Net and why you would use one over the other.
Thanks in advance.
-------------------------------------------------------------------
After some investigation, this is my understanding:
CallContext is visible to all theads where Thread data is only visible to the active thread.
I believe these mechanisms are available as a convenient way to gain access to objects and can be used to avoid the difficulties of making classes visible to eachother. I tend to use Class (static) level objects for this, but I can see in some cases (e.g., usertokens) CallContext would be useful.
- Jeff
|
|
|
|
|
AFAIK, Thread.SetData can be used to store data that you are sure you don't want to share among threads.
Regards
Senthil
My Blog
|
|
|
|
|
Hi all,
I p/Invoke a VC++ dll in C#, but there is serious memory leak, how can I fix the memory leakage by the VC++ dll caused by P/Invoke ?
(the leakage seem not come from the internal C++ code inside the dll, so I suspect it come from the loading and unloading of the dll in C#)
Thanks
|
|
|
|
|
Hi!
If it were like you say everybody would have serious problems using P/invoke.
I think it's very unlikely for the P/invoke mechanism to create memory leaks the dll itself doesn't.
The first time you call a p/invoke function, the containing DLL is loaded and as soon as the class you declared the function in goes out of scope (usually when unloading the AppDomain), the DLL is released.
What exactly are the signatures of your functions and your DllImport declarations?
mav
|
|
|
|
|
Hi All,
I am new to C# programming and need ur help.
How can I view or get an HTML page in my windows forms using C# programming. My project does not want to use any Components or ActiveX controls to achieve this.
Keep Smiling
Thanks & regards,
Neerudi
|
|
|
|
|
Whatever I understood it,Giving u code I think it might help you. If some variable is not initialized just initialize it.
public StreamReader viewofhtml()
{
sURL = this.txthttp.Text;
WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
WebProxy myProxy = new WebProxy("myproxy",80);
myProxy.BypassProxyOnLocal = true;
wrGETURL.Proxy = WebProxy.GetDefaultProxy();
Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
StreamReader objReader = new StreamReader(objStream);
return objReader;
}
public void btn_server_Click(object sender, System.EventArgs e)
{
if(this.txthttp.Text == "" )
{
MessageBox.Show("Enter the URL with http://www.google.com");
return;
}
StreamReader tempreader=viewofhtml();
string sLine="";
int i = 0;
while (sLine!=null)
{
i++;
sLine = tempreader.ReadLine();
if (sLine!=null)
{
output +=sLine.ToString();
//this.richTextBox1.Text=output;
}
}
this.txtdisplay.Text=output;
}
|
|
|
|
|
I'm in a quandry, I know what an Attribute is, how to use them, and how to make them. But... i still can't seem to find them in the .net framework without spending hours trawling through class names, and when i do find one, i then have to figure out where to use it.
Is there an easier way to locate and identify appropriate attributes for a particular target? As it is, i'm pretty lost, and i see a lot of people using attributes for things like say, VS enviroment support, that i only know exist because I have seen them used.
I suppose it doesn't help that all Attributes END with Attribute, rather than start with it.
There is an easier way right? Like, being able to list all attributes for structs?
Cheers
Tris
|
|
|
|
|
Hi,
Here at work we have a module in C++ which takes text out of the database and puts in a Word document which is loaded with a template.
I have to do about the same and I think it's a bad idea meddling with the existing code. (for numerous reasons; it's poorely designed and is half integrated with another program etc...)
Is it hard to create a C# module which would do about the same? It would be used for a demo so nothing fancy. If I have the document as a file, that would be enough to print it I think.
Any ideas were to start looking? (articles? MSDN? Code? Anything)
tnx!
No hurries, no worries.
|
|
|
|
|
I am not so sure, but crystal reports may help you in desinging documents
|
|
|
|
|
hi
i write a web application with c#.
it has some pages and thir controls such as:
validators , datagrid , datalist with template column
and they have thir event handler functions.
the application works correctly on local.
{ my system: [windows 2003 server ]}
but when i upload it to the host server , the events dont work correctly.
------------
site address:http://siteavval.com/WebVDir/MainGrps.aspx
error message for:
javascript:__doPostBack('MainGrpsList$_ctl0$LBGrpShr','')
|
|
|
|
|
I have an xml file that i'm outputing to a textbox. I have a button that is supposed to go to the next node ach time i click it. I know how to output a whole xml file but, i just want to output each node's content with the click of the button.
|
|
|
|
|
You'll have to elaborate. If you're displaying the entire XML text in a TextBox , then how do you "go to the next node"? You're already displaying all nodes in the TextBox .
Parsing XML, in general, is very easy and there's many ways to do it, from reading the whole file into memory using the XML Document Object Model (DOM) to fast forward-only parsing (SAX, or SAX-like behavior). For forward-only behavior, use an XmlTextRead , move to the first child node of the document element (root node), and keep moving to the next sibling node:
using System;
using System.IO;
using System.Xml;
class Test
{
const string xml = @"<?xml version=""1.0""?>
<root>
<child>
<text1>Hello</text1>
<text2>World</text2>
</child>
<child>
<text1>Howdy</text1>
<text2>Earth</text2>
</child>
</root>";
static void Main()
{
using (StringReader sr = new StringReader(xml))
{
XmlTextReader reader = new XmlTextReader(sr);
while (reader.Read())
{
if (reader.Name == "child")
{
Console.WriteLine(reader.ReadOuterXml());
Console.WriteLine("----------");
}
}
}
}
} You could use an XmlDocument to load the whole document into memory and walk the DOM. Again, it really just depends on your requirements.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Does anyone know how to highlight a row of text in a richTextBox control.
|
|
|
|
|
If you look at the member documentation[^] for the RichTextBox class in the .NET Framework SDK, you'll find several properties that begin with Selection* or Selected* . Many of those properties give you several different ways of selecting text based on what you want to do.
Keep in mind that there's not really a row, though. There are paragraphs that are wrapped and "rows" are formed by whatever words fit within the current width of the RichTextBox . The RichTextBox already does this, though, if you click the far left edge of the control. In applications like WordPad (which use the Rich-Edit control, which the RichTextBox class in .NET encapsulates), the margins are set wider so that it's easier to click and select a line. To do the same in your RichTextBox , set its ShowSelectionMargin property to true .
using System;
using System.Drawing;
using System.Windows.Forms;
class Test : Form
{
static void Main()
{
Application.Run(new Test());
}
Test()
{
RichTextBox rt = new RichTextBox();
Controls.Add(rt);
rt.Dock = DockStyle.Fill;
rt.ShowSelectionMargin = true;
Text = "Test";
}
}
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi all
I am using Microsoft FlexGrid (Com Component) in a desktop application(.Net). Using Globalization i am displaying Chinese characters. It is displaying in the labels and messages. But when i am trying to display in the MS FlexGrid it is showing "????" Qestion marks. Can any one help me how will I display Chinese characters in Microsoft Flex Grid.
Thank you
arun
Arun Kumar Sabat
Bangalore
India
|
|
|
|