|
mfcuser wrote: Given that the wizard gives easy access to the fields via intellicense. If I use the wizard to I still need to use parametization for security reason?
I've no idea what the wizard does. I used it once in 2001, saw what it did and thought Eugh!!! I'm not using that again!
|
|
|
|
|
Download this free e-book.
ASP.NET Database Programming Weekend Crash Course™ - introduces the reader to ASP.NET database programming in one weekend: 30 sessions of a half hour each, for 15 hours stretching from Friday afternoon to Sunday evening. At the end of each section of the book, you’ll get a chance to test your knowledge before continuing.
http://www.ebooknetworking.com/aspnet-database-programming-weekend-crash-course-p-28606.html[^]
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi, everybody!
I have inserted a dom node(representing an image) in a web page by c #, but how could I manage the click event of the node(i.e.the image)?
IHTMLDOMNode doesn't have th onClick event some ideas?
thank yuou all in advance.
|
|
|
|
|
Using typeconverter i am having a dropdown.i want to pass Displayvalue for a dropdown as string value and its id as int value.
E.g :- I have a dropdown called Fruit with 3 values(AAA,BBB,CCC).
if i select AAA i want to pass value 0,if BBB value 1 etc..
All values are retrieved from XML file.Also no hardcoding is allowed .
On propertyvalue changed event i get only display value (AAA,BBB,CCC) not id(0,1,2)...Tell me a solution to it.
|
|
|
|
|
On DataValueField property set values 0,1,2...
On DataTextField property set values AAA,BBB,CCC...
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
I’ve created a Spash-form that shows and hides while my main form initializes. When I closes the splash-form my main window is paced behind other applications in Windows.
How can I force my application form to be the “on top application”?
I’ve tried all these functions:
this.Activate();
this.Focus();
this.Show();
this.WindowState = FormWindowState.Maximized;
this.BringToFront();
this.UpdateZOrder();
_____________________________
...and justice for all
APe
|
|
|
|
|
Erhm, I think it would be neater if you open the main form imidiately and show the splash screen on top of that..
|
|
|
|
|
|
I’m automating MS Project and when I listen on an event from MS Project all works fine but when I’m trying to fill a TreeView I got the following exception:
Action being performed on this control is being called from the wrong thread. Marshal to the correct thread using Control.Invoke or Control.BeginInvoke to perform this action.
What have I missed?
I've earlier discused this topic in the COM-forum:
http://www.codeproject.com/script/comments/forums.asp?msg=1793890&forumid=1648#xx1793890xx[^]
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi,
using Invoke as you wrote in the other forum is the correct way to handle this. How to avoid changing all your calls depends on your situation. If you receive an event from another thread and want to call multiple methods on the TreeView then just marhsal the complete handler to the correct thread. Here a sample with a simple EventHandler :
public void HandleEvent(object sender, EventArgs ea) {
if (myTreeView.InvokeRequired)
{
myTreeView.Invoke(new EventHandler(HandleEvent), sender, ea);
}
}
This method just calls itself within the correct thread if required.
If the code resides within the container control of the TreeView than you can also use base.InvokeRequired and base.Invoke .
Robert
|
|
|
|
|
Ok, now I've got a new problem.
How do I Invoke a property. I got the same exception when I try to use this property:
TreeNode.ImageIndex
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi,
I am developing a set of custom controls for work with very, very specific purposes. All of these controls are inheriting from the control base class.
My question is : Is there an easy way to 'hide' all of the default properties and only expose the ones I need or do I really have to hide them one at a time?? This seems like such a silly question, I know, but I'm at a loss - most of these controls only really need the default size and backcolor properties but absolutely none of the others and hiding them one at a time from the designer and intellisense is making for some extreme code-bloat...
Any help would be much appreciated...
Cheers
Ian
|
|
|
|
|
Add a custom designer to the project and override the PostFilterProperties method. Example:
public class MyDesigner : ControlDesigner
{
protected override void PostFilterProperties(System.Collections.IDictionary props)
{
props.Remove("property name");
base.PostFilterProperties();
}
}
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Background of my Project....
My project is an asp.net web page that is to run on local machines processing local reports. As of yesterday my web page is using a report viewer to load rdl's not rdlc's. It can handle subreports, drillthroughs, export to csv, expression evaluation, parameter input on the webpage, validation of parameter inputs, etc
Code change that leads to this issue....
I was given the task to find "Special Keys" in expressions for parameter default values and dataset parameter values and replace them with other data. I thought this wouldn't be a big deal until I get this error. I really dont understand why it is getting thrown.
Below is an sample of my code and everything runs fast except when it gets to the highlighted code. When it gets there I do a quick watch on rv.LocalReport.GetParameters() and the Value says Function evaluation is timed out.
The error that is getting thrown is a LocalProcessingException with a message of Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. I think this is getting thrown because .Count on rv.LocalReport.GetParameters() is not able to be processed because of the function GetParameters() being timed out.
public RParameter[] GetRdlReport(ref ReportViewer rv)<BR>{<BR> // Always enable hyperlinks even if they do not exist.<BR> rv.LocalReport.EnableHyperlinks = true;<BR> rv.LocalReport.ReportPath = msReportFullName;<BR><BR> List<RParameter> rps = GetParameterAll();<BR> if (rv.LocalReport.GetParameters().Count > 0)<BR> {<BR> for (int i=0; i<rps.Count; i++)<BR> {<BR> RParameter rp = rps[ i ];<BR> foreach (ReportParameterInfo rpi in rv.LocalReport.GetParameters())<BR> {<BR> }<BR> }<BR> }<BR>}
Chris
|
|
|
|
|
I tried taking out the GetParameters function to see if I could still make the project work and now SetParameter function is encountering the same thing. Except SetParameter doesn't throw an error it just processes forever. I can't remove the SetParameter function because I need it to set the parameters.
Chris
|
|
|
|
|
To all those people out who where following along. I finally figured it out. Wow almost 8 hours on one little issue. After reverting some code and trying to pin point the issue, I finally got it.
This was NOT a C# coding issue. The issue lies in the RDL.
What I wanted was to be able to put special keys into the default value of report parameters. This was my default value <c>=CDate("%MyKey%") for a DATETIME report parameter. Then when reading this out of the rdl I was replacing the text %MyKey% with something like 4/2/2005. The resulting string would be <c>=CDate("4/2/2005"). Then this expression would go into my Expression Evaluation code and produce the result of 4/2/2005 into a DateTime object. Then I was going to loop through all the report parameters and set the default value of that datetime one as 4/2/2005. Which would result in the RDL loading properly. This is what I hoped for.
In all actuality when I try to loop through all the report parameters, the GetParameters function doesn't work because (I guess) it cant return all the parameters because there is one with an invalid default value (<c>=CDate("%MyKey%")). Well I dont know what I am going to do for report parameters other than strings.
Chris
|
|
|
|
|
Hi Guys,
In my application..
1)I am having one starting form with progress bar which shows the loading process...
2)After completing the progess its starting the actual application form.
3)But when I am closing the first form with progess bar..its closing the whole application..
4)Right now I am making the first form hidden, but I cant close it..
I completely want to close the form....
Thanx
Nishu
|
|
|
|
|
You can not close it nor dispose it. It is like the mother form. If the mother dies all the children will die too.
You must keep on hiding it.
Why are u insisting to completly close it??
Any good reason for that??
|
|
|
|
|
Right now I am doing that only..But is this the only solution...???
Nishu
|
|
|
|
|
|
Hi,
have a look at your Main method. Somewhere there you will find something like this:
Application.Run(new FormStartup());
Change it to something like this:
new FormStartup().ShowDialog();
Application.Run(new FormMainApp());
When FormStartup is done just close it and the other form will appear.
Robert
|
|
|
|
|
That sounds cool.
I will try it.
|
|
|
|
|
The functionality you're describing is called splash screen and there are some articles here on Codeproject that cover this topic and should give you some ideas how to implement this effectively and nicely. Just search the articles for "splash screen".
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
I'm inheriting TabControl in user defined class CustomTubControl, but when I try to open form with this control in Designer, I get error message: "TabPage cannot be added to a 'Microsoft.CompactFramework.Design.UnsafeControl'. TabPages can only be added to TabControls." on line:
this.m_Tab.Controls.Add(this.tabHeader);
Form builds, but it is not visible in Designer. How can the new control be visible in the Designer?
|
|
|
|