Main Topics
Browse All TopicsCan anybody direct me to a really simple example of how i can set up a DbContext using EntityFramework 4.2/4.3 and code first, such that I can bind a WPF control to the data using the MVVM pattern and have the control update when new entities are...
Public Shared Function GetScriptReference(ByVal scriptPath As String) As ScriptReference
Dim sApplicationUniqueId As String = ""
If Not IsNothing(HttpContext.Curr
how to write the following format of feed Request in asp.net
Hello,
I'm from a C#.NET 4.0 + Linq background and I just started with PL/SQL. I am trying to query a database and obtain two values which I can then use in my C# code.
Here is the C# code I have so far:
string sqlstmt1 = "SELECT...
hey guys i want to post messages on my wall on facebook but i keep getting this error:
fobin 403
for this code
protected string postToWall()
{
var accessToken = Session["##########"];
var graphId =...
Hi,
Is there a way i can associate javascript key events (like keypress/keydown) to a Filter Input TextBox in RadGrid.??
I want to avoid Users from entering certain special chars using "keyboard or Copy paste " into the Filter input text...
In my Controller Action, I added a FormCollection as an input param. And inside the Controller Action I am able to expand the "AllKeys" list of strings and see each field submitted.
BUT, I can not find the values entered by the user. I know...
I was uploading my file using below code,it works fine but some time it throws this error"The underlying connection was closed: The server committed a protocol violation" and stop the process ,when i run it again it upload file with out any...
Hi,
I am using Stored procedure and SP is having select query: I am having more than 20 million records.
Sql query read all 20million records: Select ID, RawData from RawDataTable
I am using SqlDatareader to read records in c#....
hello experts,
I am developing a website and i want to call jquery colorbox on asp.net button click event. When user clicks on the button the some calculation will be performed in code behind (C#) and then system should display the jquery...
I have been told that I can use the free dll itextsharp to convert an excel workbook to pdf. Does anyone know where I can see a sample to do this? I don't want to have to build the pdf on the fly by reading the xlsx file and doing a lot of...
I received the error in the title. Can someone help me troubleshoot?
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFa
Hi All,
Am trying to convert the string to Int in my windows app but it fails every time (returning "0") even am using parse.
Please some one correct me what am missing please
string strSearchVal = txtSearch.ToString();
...
Need help with this default.aspx.cs I have the following errors.
using System;
using System.Collections.Generic
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using...
This is my last attempt before I ditch Crystal Reports altogether...
I've read lots of articles on speeding up load times of cr's which has become a major issue for me recently, so I redesigned my application into two parts because it's not an...
I am having a problem using an apostrophe within a totext.
ToText({Command.FirstDayOf
I am getting the following error; "Bad date-time format string. Details: errorKind Error in File RunningReport...
I need a httpwebrequest script that can submit details of login form programmatically and then be able to get page source of pages that requires the login.
FORM:
Wireshark Data - On form submit (POST /login.php HTTP/1.1 ...
I have the following in my model.
[DisplayFormat(DataFormatS
public double Rating { get; set; }
I have the following in my view
@Html.DisplayFor(modelItem
This is not working for me. I get an error on...
I need to read each column value of a tab delimited file.
The file is retrieved.
The column values are not returned.
What do I need to modify?
Thanks,
Source file:
Tab delimited
Date OldExchange OldSymbol NewExchange NewSymbol...
Hi,
I have gridview. i am displaying type and title in the Gridview on button click. When linkbutton expand click, it will display the details of the title which is 'text'. How I can do that. I am posting the code. This code on clicking the...
Using DecodePixelHeight, I can change the size of the image.
But I only want to limit the height of the image to a certain value.
e.g.
The maximum height I want to insert is 48 pixels.
If an inserted image has a resolution of 64x64, then...
I developed a WCF Service. I enter URL HTTPS://myserver/myservice
...
Hi,
I have to implement cryptography in two technologies(php & dotnet).I followed the
below link
http://sanity-free.org/131
i have to encrypt by php and decrypt by c# reversal too.
Now...
Are there are any open source libraries which make it easy to create/update powerpoint files using open xml?
I am looking for something similar to EPPlus which is library to work with excel files using open xml.
Hi guys!
Need some help to "draw" the architecture in a correct way.
I have two services, service 1 is monitoring some folders for new files, when a new file is created it then sends some information about the file to service 2 for...
Hi All,
I have a string variable like so:
string strDesc = "<span title=More of something here>Something here</span>"
This variables content can differ but the structure stays the same i.e.
"<span title=*>*</span>"
Could anyone...
I'm a dot net begginer but struggling...
Could you please give me instructions on how to workaround these bugs ?
Running:
Thes bugs happen
another amazing thing
Even with this message:
runs with the modifications I've...
I have an asp:TextBox. When the page loads I would like to set the cursor to be active in the textbox. I am using .net C#.
Dear Sirs: I am working on a Walkthrough: Using a Configuration file to define a Data Source. I have errors on MyTestMethod and MyTestMethod2 tests. This is a lab2 presentation that I must make. It is classwork. Is it possible to help me...
Hello experts,
I have a string like
string str = "A=1&B=2&C=5=6&D=7=8&E=9";
Dictionary<string, string> dict = str.Split('&').Select(x => x.Split('=')).ToDictionary
using above Linq I get the output as
A = 1
B = 2...
Here is my dilema, I have issues with some workstations taking several minutes to log in.
Is there a limit to the number of WS I can have on a 2003 SBS server (aside from counting actuall licenses)
Should I be counting printers? they are...
Using Visual Studio 2010 I've created a c# 'WCF Service Library'. I've defined a service contract and exposed a method using WCF. I can succesfully test using teh WCF Test Client. The metadata address is...
Hello I created a custom field:
<Field ID="{XXX}"
Name="MyNiceDay"
StaticName="MyNiceDay"
DisplayName="MyNiceDay"
Description="MyNiceDay"
Group="AllNiceDays"
Type="DateTime"
...
Hello experts,
I am trying to hightlight the menu item selected...
Any suggestion??
<asp:Menu ID="NavigationMenu" OnMenuItemClick="Navigatio
<items>
<asp:MenuItem Text="menuItem1"...
Hi,
I have written a simple .NET c# application that downloads the source code of a HTML web page and reads the stream line by line.
The HTML contains many links like this:
I need to extract the link address (eg:...
OK, so I'm pretty new to C# development, and I have an issue that I am just not understanding.
I have a SQL Server 2005 compatible DB with a series of tables. The ones that matter are the Users, Compatibility, and Suppliers tables. There is...
Hey,
I have a single DLL ("Debug.dll"). What i want from this is for ANY of my applications to be able to reference that DLL and call the WriteLine() function but that output to be outputed to the same stream.
Can you make some kind of...
OK I would like CTRL-A (on keyboard) to select all the text in my textBox1. Right now CTRL-A does nothing, even though my cursor is in the textBox1.
Hi
I am new to C#. On my ASP.net WebForm I need to run code when a GridView is double clicked. When I double click on the GridView in design mode, I can find the SelectedIndex changed event. How do I find the Double cLick event?
Thanks
Hello,
I am working on a simple WCF Rest Service, that will be used by iPhone to upload images to a database.
The problem I am getting is with the Stream parameter when I run the service in visual studio, which opens up a web page,...
Hi,
I have downloaded JQSuite from trirand and have been very impressed. Has anyone experience with this as I am about to purchase.
Any opinions experiences would be greatly appreciated.
Thanks in advance,
John
Hi,
I have a scenario where i have to spurn 50 to 60 threads and each thread do the same operation... i was looking for some online examples but didnot get enough info as i am new to threading in C#...
I have to start threads based on...
I am able to dynamically write JavaScript routines in my ASP.NET/C# code behind page in order to open a new window. However, I notice that this is only done when there is a full page postback. When I try to perform the following code segments in...
what is the best way to insert data into an xml document already exists ?
Hi,
We have a executedataset method where we pass store procedure name, store proc input parameters as dbparams
Executedataset(storeproced
But while trying to execute the store procedure which has a dynamic query in...
What are the scenarios in which a project should preferably be made in Java as opposed to .Net?
In other words are there any limitations in .Net in terms of performance, Functionality, etc that is not an issue in Java?
This SQL which has been in place for over 8 months when run on MySQL throughthe MySQL ODBC driver under .net is sometimes taking up to 36 seconds to return the result and as a result my .net application is timing out. I know that is the...
I developed an WCF application. I speicifically followed: http://www.codeproject.com
The application works with files under 20MB. I'm trying to download a file that is 1GB. I...
Hi everybody.
How do this in C# ?
int a = 30;
int b = 40;
if ((b - b) == ± 10 % of b)
{
}
or between +10 % of b and -10 % of b .
Best regards,
ocaccy
Hi there, I was just wondering if it is possible to make a client + server application that would allow the client application send data via servers ip address.
Basically client's application would only have a webbrowser in it, but all the...
I have a small website with a Homepage which displays x2 paragraphs of text. These paragraphs are populated from a single record in a database containing 3 fields "ID", "para1" and "para2" (paragraph 1 uses "para1" and paragraph 2 uses "para2")....
I am looking for a simple way to make asp.net drop down multiple columns.
just like list of state. it is too long. and i like to have four columns....
the language is asp.net/c#. Thanks
I am pretty new to formatting controls in aspx pages. I am trying to create a page that displays a set of controls, one of which is a ListBox. I would like the ListBox to fill the available width and height of the screen without scrolling from...
Whats wrong in my following syntax ?
string javascript = "<script type='text/jscript'> " +
"$(document).ready(functio
"$('" + "#" + this.ClientID + "').datepicker('" +
"'{ showOn: '" + "button" +"',buttonImage: '"
+...
Hi All,
I have a interface with a Siemens PBL.
The methods that is exposed to me to read from the PBL takes 7 parameters.
And I am not sure how to declare the parameters and types for the parameters.
Please have a look at the attached...
See below the following code snippet is not working as expected. On a validation error the recource file does not appear to be recognized. The solution is a Silverlight App using an mvvm pattern using ria services and entity framework.
...
What am I missing? This is not working but the requirements are that the player plays against the computer. I need thee computer to randomly generate the r,p,s and compare it to the users input and decide if the computer or the user win not as a...
I have a task to add a presence awareness indicator (green/yellow/red "dot" similar to Lync/Communicator and Outlook 2010) in a SharePoint 2010 web part.
To save time - and not "invent the wheel again" - does anyone have a simple example of...
Hi there, I would like to know how to click submit button on the HTML form in a webbrowser control.
HTML FORM:
PS: I have no access to the page, so I cannot change the source code, it has to work with the one above.
Thanks
Hi,
Disclaimer: I'm new to ASP.net MVC
I'm currently trying to convert a few websites from Web Forms over to the MVC 3 design. I having some trouble trying to figure out where I should stick my layout (master page) logic.
I have a...
I have been asked to look at creating a simple map application using Google Maps API V3. The idea is to add a set an initial location and scale and then add a load of markers for bus stops around the area.
Trouble is all of the examples I...
In a console app, I am prompting a user to enter a number between 1 and 3.
I can verify that the user is entering an integer with the following code:
How can I ALSO verify that they are entering a number between 1 and 3, preferably in...
I have users who change their Start+ControlPanel+Display
1024x768 -to- 1280x1024 -to- 1680x1050 etc, etc, etc ... Why? Don't ask, it's a long story with a lot of screaming and pounding of fists on table tops (smile).
I have a...
Hi,
I am having a really hard time finding a simple example of creating a view and related changes to model/controller(s) to display a child record <view>.
In other words - I am not trying to accomplish fancy master-detail display and CRUD...
I am trying to finish a program by adding the emailing attachments when the program finishes. I have taken the code below from the Microsoft sample code site.
----- if (answer.StartsWith("c") && mailSent == false) ---- On this line I am...
I need to store information across multiple pages and I was wondering what the difference is between "Viewstate" and "Session" in ASP.Net?
When is it preferable to use one or the other, and what are their similarities?
Also, what type of...
Hello experts,
I have a single page intranet application that has a submit form (file upload control and a upload button). Below that I have a 3 column gridview control.
When the user uploads their file the app returns info from the file...
Hello,
i new to c# and programming i have to create something like this:
users user01 = new users("bob", "Piet"); //if no date given it should be set to 2012
users user02 = new users("Roels", "Lut",2003);
users user03 = new...
I have just read an article on encapsulation on wikipedia:
http://en.wikipedia.org/wi
It says:
"Encapsulation is to hide the variables or something inside a class, preventing unauthorized...
Hello everybody, im trying to serialize a class and everything works as expected, however, the empty string properties are being serialized like this:
<Element />
and i need it to be like this:
<Element></Element>
I saw that using the...
Hello experts,
I have a gridview with a checkbox column. I am binding the gridview to a dataset. The first column in the dataset is bool (true\false). When the page loads, how can I programmatically check the check boxes if the dataset...
I am trying to add a service reference with an ssl url. It finds it but when it is adding it - I receive an error.
It says:
Failed to add Serivice reference
'APIServiceReference.Refer
Error:Exception from HRESULT:0x80040400
Please...
why ?
protected void Button1_Click(object sender, EventArgs e)
{
some code.. not working
Using Crystal Reports for Visual Studio 2010 (version 13.0.2000)...
I'm using the CrystalReportViewer control to display reports in a webforms application. I've chosen to use the ReportDocument object model as it is the suggested approach. ...
Hello Experts,
I think this is an easy one. I need to set a variable to an object already my aspx. Here's my code it's called during the page_load event.
Thanks
Hi,
I am using the Global.asax file and in there I am using the session_end event.
I am calling a procedure that needs the ID of the person logged in. When the person logs in on the login page i use to get the ID
...
Hi
Can anyone direct me to a simple set of free startingvideos for C#. If possible looking at it
from the position of a VB.net developer.
Thanks
I have the following gridview. I am looking to start adding some advanced concepts to it. I will refrain each enhancement as a unique question. Essentially do not have the capital to fork out an entire library of controls from a 3rd party...
Hello experts,
I have project of survey containing 1000 questions. 25 questions per page. I want store the survey in database at last page. So how can I maintain the values since I need to store the value only after last page. Which strategy...
I have a number of buttons that perform actions on the selected record in a bound datagrid.
I only want to enable the buttons if a record is selected and the values of certain properties for the selected item meet the right condition.
I'd...
Hello,
i have made a program it ask for a money amount .
and it spits the money for example , If you give 150 its wil says:
1 X 100
1X 50
But when i try to use 150,20 cent
it doesn't work , i don't know what im doing wrong or...
Why is the publish.htm page not created after I published my project?
I have the following link that is one of 100 links on my web page.
<a onclick="window.open('http
I'd like to remove...
We are using .NET to create various reports (in .txt format) - so files created are text files. Using streamwriter and corresponding code like writer.WriteLine(.......)'
Hey everyone,
I'm currently embedding a flash file in a C# project as a little test and I'm somewhat stuck on something. This flash file doesn't actually play a movie, instead it handles some RTMFP P2P chat things that would normally be done...
My xml loader is complaining about an invalid character as "Invalid character in the given encoding. Line 39, position 31." I could not find this character and dont know how to fix it? Any ideas thanks
I've got this linq query:
string dateCreated = (from c in db.cars
where c.id = 123
select c.DateCreated).FirstOrDefa
For some reason, when the...
I have the following code in my code behind that my instructor provided: And I was just wondering how something like DictionaryEntry can work with the "cart" ArrayList in this example. I was under the impression that Dictionaries are Hashtables...
I use an Excel file to allocate people to committments over the year.
The column header is the commitment to which they are allocated, the row is the date that they are allocated.
People are allocated to a date and commitment by placing their...
This is going to be a strange issue and I don't expect an answer, but I would appreciate any insight.
I'm using Ghost32.exe to image HDDs within a Windows PE environment. With the release of WinPE 4.0, we can now use the 4.0 .NET framework. So...
Hello EE,
I have a DataGridview I would like to export to excel. I know how to do it with for next...
my problem is the column order in the excel needs to be a little bit different.
lets say Columns in the dataGrid are :
TotalCredit ...
Hi experts,
I have this XML, which I am not allowed to change. My question is how to use LINQ and select the name,phone,key2 and val2 from this XML?
<Root>
<OrganisationList>
<Organization>
<Name>xxx</Name>
...
I want to set the "Price" field to have a mark-up profit of 25 percent.
ProductCost = the cost of the Product before mark-up.
UPDATE ProductVariant
SET Price =
CASE
WHEN ProductCost BETWEEN 20.01 AND 200.00 THEN (ProductCost * .25)...
I am working with PLC and I am looking for an example: C Sharp code for the client and how to configure and test the PLC. I have a PLC in my work already working.
Thank you
I have a DataGridView that is bound to a list of class objects. I have added two additional checkbox columns to the datagrid view to allow users to select which items a user should have access to and which one should be the primary item. This...
I'm am trying to understand how I can sort a binding list. I used a reverse function that doesn't work. I'm surprised that c# doesn't have a method already built to sort a list. Here is how my class looks:
the...
Hey,
I'm a beginner C# developer. I've been trying to figure out the most efficient way of adding about 300 small image like icons to a DataGridView.
I have a SQL Database with a Primary Key of ItemID. And what I would like to do is match...
I am new to web development, and I am considering using the ASP .NET XML Serializer control and I plan on placing the data from a big data entity into a BLOB or long string column within a SQL Server Database to temporarily store the entity that...
I have a scheduled task that runs exe which is a windows application. In order to see UI, I need to check "run only if user is logged on", but when I create a scheduled task I cannot specify which user it will run under, so if I specify System...
Can you tell me how I can prompt a user to enter something during install using the Inno setup file?
I want to ask user to enter something and I want to use that value to create a registry.
kaufmed
566,376
Sage
500 points yesterday
ProfileBuggyCoder
240,764
Guru
10 points yesterday
Profilenavneethegde
158,560
Guru
0 points yesterday
ProfileCodeCruiser
140,708
Master
2,000 points yesterday
ProfileTheLearnedOne
137,350
Master
2,800 points yesterday
Profilewdosanjos
124,511
Master
3,500 points yesterday
ProfileAndyAinscow
107,357
Master
0 points yesterday
ProfileDhaest
98,335
Master
0 points yesterday
ProfileIdle_Mind
91,914
Master
0 points yesterday
ProfiletommyBoy
90,068
Master
0 points yesterday
Profilenishantcomp2512
89,000
Master
0 points yesterday
ProfileMlandaT
86,553
Master
0 points yesterday
ProfileChinmay_Patel
80,818
Master
0 points yesterday
Profileddayx10
66,538
Master
0 points yesterday
Profileanarki_jimbel
66,132
Master
2,000 points yesterday
Profileambience
63,764
Master
0 points yesterday
Profileukerandi
62,593
Master
1,000 points yesterday
Profileapeter
60,772
Master
0 points yesterday
ProfileJamesBurger
60,305
Master
0 points yesterday
Profilesedgwick
52,750
Master
1,600 points yesterday
Profileemoreau
50,917
Master
0 points yesterday
Profileged325
50,311
Master
2,000 points yesterday
Profileanuradhay
49,977
2,500 points yesterday
ProfiletechChallenger1
47,638
0 points yesterday
Profilemas_oz2003
43,540
0 points yesterday
Profile