Using WinForms; Is there a better way to find the checked RadioButton for a group? It seems to me that the code below should not be necessary. When you check a different RadioButton then it knows which one to uncheck… so it should know which is checked. How do I pull that information without doing a lot of if statements (or a switch).
...
the following generic method gives the compile error "Error 13 Value of type 'Distribution' cannot be converted to 't'" :
Public Shared Function CreateObject(Of t)(ByVal ID As Integer) As t
Dim TType As Type = GetType(t)
If TType Is GetType(Distribution) Then
Return CreateDistribution(ID)
ElseIf TT...
I have a .Net Panel control that contains a single child control that is a WebBrowser. I won't go into the reasons for me doing that, but it is related to printing out the control. The panel control has its AutoScroll property set to "true" and I am sizing the WebBrowser to fit its own content (by using the .Document.Body.ScrollRectangle...
fails when I try Regex.Replace() method.
how can i fix it?
Replace.Method (String, String, MatchEvaluator, RegexOptions)
I try code
<%# Regex.Replace( (Model.Text ?? "").ToString(), patternText, "<b>" + patternText + "</b>", RegexOptions.IgnoreCase | RegexOptions.Multiline)%>
...
Is it possible to embed a .net resource (resx) into compiled assembly as a native win32 resource? Like I need an array of native resource images writing my MMC custom snap-in.
...
I have a class that i store in a list.
I serialize it ...
XmlDocument xd = new XmlDocument();
MemoryStream ms = new MemoryStream();
XmlSerializer xm = new XmlSerializer(typeof(List<BugWrapper>));
xm.Serialize(ms, _bugs);
StreamReader sr = new StreamReader(ms);
string str = sr.ReadToEnd()...
Do you have any suggestion for a product/solution that allow clients to create web forms online?
This is the scenario:
Superuser creates web forms and publish them for further usage (for other users of the site).
I need asp.net or asp.net MVC. It would be good if it is possible to buy licence with source code, so I can customize and ad...
Hi,
I came across a problem while updating a typed DataTable that has a primary key column.
At some point in my code I fill DataTables (some of them have primary and foreign key columns) and then I insert the data of all DataTables in one transaction using DataAdapters and Update(). Because the typed DataTables do not allow the PrimaryK...
Does Mono support XAML?
Specifically I'm thinking of switching to using XAML for new GUI work that I do but also I like to keep my personal projects compilable in Mono. Should I just stick with plain old System.Windows.Forms for now?
...
I'm new in .net and I'm interesting in following.
I've downloaded a library from this.
But I don't know how to import it into my project for using.
How do I do that?
...
Hello
I would like to shadow/override an event in VB.NET.
I do it only because I have to implement in this object an interface, that contains the same event like the base object itself, and I need to keep this base event as is it without modification nor supplementary event additions.
How can I do it?
Public Shadows Event VisibleCha...
One of F#'s claims is that it allows for interactive scripting and data manipulation / exploration. I've been playing around with F# trying to get a sense for how it compares with Matlab and R for data analysis work. Obviously F# does not have all practical functionality of these ecosystems, but I am more interested in the general advan...
I am trying to compose a SOAP message(including header) in C# .NET to send to a URL using HTTP post. The URL I want to send it to is not a web-service, it just receives SOAP messages to eventually extract information from it. Any ideas on how to do this?
...
I had a textarea, when i post that content in textarea, I only get only first word before a space is given. For example if my value in textarea is 'He is mad man', i get only 'He'.
plz Help me to sort out this problem;
Code:
<form name="SendSMS" method="post" action="admin_main.php">
<div class="reg_item">Category </di...
I have an interface, with a definintion for a property that is the same type as the interface.
public interface IMyInterface
{
IMyInterface parent
{
get;
set;
}
}
Now if I declare a class and inherit from the interface, I need to create the property called parent. I want my class to be serializable to us...
Recently I'm refactoring a .net program which will use a custom usb device. The device comes with a dll for communication. The dll is written in c and by checking the header, it defines a set of error return codes.
The first step to comminicate with the device is to open the device.
In dll, the open function looks like this:
// retu...
Setting up a new team build in tfs build 2008, you're forced to select a .sln file for your build definition.
I've read through Microsoft.TeamFoundation.Build.Targets, and from what I understand, all team build does is convert the silly .sln format to msbuild in tfsbuild.proj on-the-fly, and then build that. So what you end up with is ...
I use ASP.NET during my day job, but I'm always looking to expand my programming knowledge. I've tinkered with everything from Ruby to 6502 assembly language, and now I want to learn Lisp. I guess I have Paul Graham to blame for that.
I've heard about "Practical Common Lisp" and I know how to Google, but I'm curious if there are any ....
Hello,
Before asking this question I have googled for some time, but could not find any relevant information on this topic.
My problem is simple:
I have NHibernate criteria and projection and I'm trying to set DISTINCT ON(column)
My code for projection is following:
criteria.SetProjection(
Projections.ProjectionL...
I'm using a Json.NET library. What's the most convenient way of serializing/deserializing arrays in JSON via C#? For example, I'm trying to deserialize the following text (reading from file):
{
"Name": "Christina",
"Gender": "female",
"Favorite_numbers": [11, 25 ,23]
}
I'm reading the text above from file to a variable:
J...