- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
33 Posted Topics
I have been trying to get a single model, with multiple partail views that use that model to sumbit the form correctly. @Html.Partial("_EmployerDetails", Model) <br /> @Html.Partial("_OutcomeControl", Model) When I submit the form only the firt PatailView model is posted. The second partailview values is null. I need to modulize …
Use jquery if you do not want an postback. $("#RadioButtonId").live("change", function() { $('#TextBoxId').val($("#RadioButtonId").val()); };
Hi I have been trying to wrap my head around a small issue I have. I'm trying to show a messagebox if a value a met. [CODE]if (CurrentProcess == "Test") //Show message then do something else else //Do Something else [/CODE] JScript confirm will work with onclientClick but that is …
Hi I have a problem with on of my sites and need some help. I have a site that uses cookies store a UserID that is used in that session. Recently I added that a user can have diffrent profiles so I craeted a ProfileID can user in stead of …
I'm using this to match a phoneNumber that is 10 characters in lenth. Is there a cleaner way to write this? [CODE]select * from a where TelephoneNummber not like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'[/CODE]
Hi I have a issue that my application in currenlty doing number validation with an issue. I have a query that checks number is stored procedures but need more checks. [-d0-9] and checking that the lenth is 10 characters, all that is working as it should. The issue I'm having …
Hi I have a issue that my application in currenlty doing number validation with an issue. [-d0-9] and checking that the lenth is 10 characters, all that is working as it should. The issue I'm having is: '0000000000', '1111111111',....,'9999999999' that passes my checking but is there a Regular Expression to …
OMG, get the row count from the datatable, use the random funtion to generate a number and ref that number with the datatable row
[CODE]select CS.Ref, CS.C, DT.ID, DT.Init, DT.Surname, 'C' [P], 'C' [A], 100 [M], case when Convert(Varchar(10),CA.A,120) is null then Convert(Varchar(10),CS.DC,120) else Convert(Varchar(10),CA.A,120) end, C.R, Convert(Varchar(10),C.CDate,120), Do.Outcome, CT.PhysicalOwner, Convert(Varchar(10),CS.CDate,120), Convert(decimal(8,2),CS.B, Convert(decimal(8,2),CS.CB), Convert(decimal(8,2),CS.IB), Convert(decimal(8,2),CS.Calance), Convert(money,SUM(dd.C)), Convert(money,SUM(cl.C)), CT.CID[Cust_ID], Convert(varchar(10),CS.JDate,120), CS.JCN, CO.C, Convert(varchar(10),CS.OD,120), CS.OCN, CO2.C from table1 CS inner join table2 DT on DT.DID = …
Can use zedgraph I found that nice and easy to work with
As Momerath, 1st go and do some cleanUp of your code. Use methods and call them from the case, that will make bugtracing and error finding much easier. But just imlement and METHOD to check if all data has been entred, if not stop and prompt error message to say …
Hi Basicly have been googling for a long time now and can't seem to find a clear answer. I want to bind to forms to each or something like that. I have an main form and display a child form from it. But I want to make it one form …
Hey I have been looking at google page for some time now and can't seem to find a straight answer. I have a application that is released. Now I want to update that application. How can make a updater? It is released a Installable app, but I don't want to …
I want to start a external application and capture the output. [CODE] private void button1_Click(object sender, EventArgs e) { Process proc = new Process(); proc.StartInfo.FileName = "Auto-Compiler.bat"; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.RedirectStandardError = true; proc.StartInfo.UseShellExecute = false; proc.EnableRaisingEvents = true; proc.StartInfo.CreateNoWindow = true; proc.ErrorDataReceived += new DataReceivedEventHandler(proc_DataReceived); proc.OutputDataReceived += new DataReceivedEventHandler(proc_DataReceived); …
I found a small issue in one of my app's. I'm reading data from a database to a array(so to say) [CODE] npc_text.text1[0] = reader["text0_1"].ToString(); [/CODE] Now I'm having the problem that "text0_1" can be a NULL value. The to string complains about it. If I use a variable it …
Code above is very unsafe and has many possibilities to fail. Better to use [COLOR="Green"]try/catch/finally[/COLOR] block for connection to the database and use a more "Where statement query" [CODE] using System.Data.SqlClient; private void btnCompile_Click(object sender, EventArgs e) { string qry = "SELECT Password FROM Tablename WHERE User=" + edtUserName.Text; using …
[url]http://www.csharp-examples.net/string-format-datetime/[/url]
and your Leap year can be done like this [CODE] if(DateTime.IsLeapYear(year)) leapYear = true; else leapYear = false;[/CODE]
No one knows all the exceptions, the best will be to inherit the exception class. But at will also be a waste you can just try/catch/finally the connection and all the exceptions will be caught.
Hey I have a application with two forms: Form1 and Form2 now Form1 displays Form2, but how can I go back to Form1, I know it will not help if I create another instance of Form1. What I have Form1 [CODE] private void button1_Click(object sender, EventArgs e) { Form2 FormMain …
Basically you need to use if conditions inside the get Title attribute [CODE] if (ELO >= 0 && ELO <= 499) { Title = "Pawn"; } else if (ELO >= 500 && ELO <= 799) { Title = "Knight"; } [/CODE]
Think the best way will be to create a void that you send it the mark and it has conditions that will add 1 to the variable while the user input the mark. [CODE] public void Grade(int mark) { if (mark > 80) { a++ } else if (mark < …
Just use [CODE] System.Diagnostics.Process.Start(comboBox1.Text); [/CODE] That is if you add the full URL in the combobox
[CODE]private void submitbutton_Click(object sender, EventArgs e) { if (checkbox1.checked && checkbox2.checked) { Form2 Form = new Form2(); Form.Show(); this.Hide(); } else { MessageBox.Show("You are not accepting our terms.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }[/CODE] I just don't understand what you want with this "Nb::no need of database connecting,it will check itself …
Here follows code for the timer [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { Timer timer1 = new Timer(); public Form1() { InitializeComponent(); timer1.Interval = 10000; //10 sec interval timer1.Tick += new EventHandler(Tick); …
OK my understanding of this is that the BookException class needs to look like this [CODE] public class BookException : Exception { //BookException class private string _title { get; set; } private int _pages { get; set; } private double _price { get; set; } //Message that get returned public …
OK This you got:) 532 * 0.1 = 53.20 532 - 53.20 = 478.8 To work out the discount % 50 / 532 * 100 = 9.398...% Hope that helps
Hey I'm using a dbexpress to connect to a mysql server, that works. I then do a query and from that assign values to variables. Now my issue it that I can't seem to find a way to read a 'NULL' value from the Database and assign it to a …
I want to let the user select a .rar file. From there the application should unzip it and move the files to a folder that the user specify. If the files exists it should replace them by default. I'm using a opendialogbox to select the .rar folder, but from there …
[QUOTE=GregPeters;1146371]How Would I go about: 1) Counting the number of lines in a text file 2) Counting the number of words in a text file. I know that I have to Use AssignFile(), and many other file operators, I just don't know how to do this. Any help would be …
Using a dbexpress component to connect to a mysql DB. If I want to commands like Insert, Delete and UPDATE I use a query. The question is How can I let the user Write the commands into a Richedit or Memo, what ever is the best. And then load those …
Hay I'm new here...I was google surfing for hours looking for help and I found this:) I'm a young student doing my BSc(IT) grade. I'm a part time Delphi hobby programmer. Currently I'm a Dev at Evo-X and Doing a Application for them in Delphi. Kind regards Singlem
Hay I'm just spent hours on google and other sites, can't find any help. I just wrote my 1st major application and now I want to make it installable. Is there components I can download or built in that I can use to do this?
The End.
Singlem