16,004,778 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by varmartins (Top 57 by date)
varmartins
30-Mar-15 6:42am
View
It is something like this that I want... but what I want is for the method to receive data through json (since I'm sending it from Ember.js) and to return the users permission group
varmartins
27-Mar-15 11:03am
View
And where would i save the response (authorization group) so that I could access from the frontend?
varmartins
27-Mar-15 8:10am
View
The problem is I want to call the api from the frontend which is being done with Ember.js so I would want for it to receive the data (username and password) check it against the active directory and return if the user exists and his group of permissions
varmartins
10-Mar-15 8:07am
View
No, they don't allow null. Ok I'll try debugging this.
varmartins
10-Mar-15 7:53am
View
changes is a nvarchar(MAX) that's certain. What else could it be?
varmartins
10-Mar-15 7:39am
View
changes is a String (nvarchar(max)) . What it's doing is not putting ' --> ' into a date but 2 dates and ' --> ' into a String supposedly
varmartins
10-Mar-15 6:27am
View
Thanks mate ;)
varmartins
10-Mar-15 6:03am
View
I didn't understand the question sorry. But what I want is for whenever a value(s) is updated on the table Events the changes are recorded on Logs
varmartins
2-Mar-15 6:38am
View
My requirements are to have the changes saved in a db, my goals are to do this effectively and in the easiest way possible
varmartins
2-Mar-15 6:01am
View
I have heard of them but databases are not my strong part... So you think the best way is to use a trigger that on update will add data to the "log" database?
varmartins
23-Feb-15 10:06am
View
I tried:
{{view Ember.RadioButton valueBinding='example' class="form-control"}}
but of course that didn't work since the RadioButton handlebar doesn't exist.
varmartins
23-Feb-15 9:52am
View
I have tried to bind a value to it but it wasn't working so I read about it and what I think I have to do is write the code for a RadioButtonList in Ember (a component), but I'm sure if I should do it or how
varmartins
16-Feb-15 5:41am
View
I reposted because I put more information and I really need this answered and no1 was answering...
varmartins
11-Feb-15 6:03am
View
I know ember is JS, so I'll improve the question so you can understand better
varmartins
9-Feb-15 10:23am
View
Thanks mate ;)
varmartins
9-Feb-15 10:06am
View
Yeah I mean running LDAP queries
varmartins
9-Feb-15 7:52am
View
It helps regarding know why and what is happening but still not sure how to fix this... what I want is for the id to not show in the get request, but I think I need the Id field in the DTO to use as a "where" in a select right?
varmartins
4-Feb-15 6:26am
View
Thanks mate ;)
varmartins
4-Feb-15 6:25am
View
Thanks mate ;)
varmartins
4-Feb-15 6:05am
View
Yeah I know I have to create a component in ember I was just asking how to do that... If I can't do it in Ember yeah I'll use the normal RadioButtonList but I wanted Ember because I'm doing this project to learn it ;)
varmartins
4-Feb-15 5:51am
View
What I'm looking for is building a RadioButtonList in ember
varmartins
30-Jan-15 10:52am
View
well that was stupid of me... but it still didn't fix the problem
varmartins
28-Jan-15 12:44pm
View
Aren't things like angular.js ember.js etc JavaScript frameworks?
varmartins
28-Jan-15 12:21pm
View
I'll be using a framework and those work differently so you're learning how they work and how to use them... that's what I mean
varmartins
28-Jan-15 6:56am
View
and how do I associate the file table with the form table in a way that all the images uploaded will be connected with the form they were uploaded with?
varmartins
27-Jan-15 12:34pm
View
yes
varmartins
27-Jan-15 9:36am
View
fixed this, still complains about format
varmartins
27-Jan-15 9:34am
View
It's still the same it doesn't accept the format
varmartins
27-Jan-15 8:00am
View
oops sorry :S but still is doesn't work...
varmartins
27-Jan-15 6:54am
View
This is the error:
An exception of type 'System.Data.SqlTypes.SqlTypeException' occurred in System.Data.dll but was not handled in user code
Additional information: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
varmartins
27-Jan-15 6:52am
View
Here's what I did:
SQLCmd.CommandText = "INSERT INTO Event (Name, Project, Objectives, City, Country, Event_Start, Departure, Arrival, Registration, National_Transportation, Accomodation, AC_NumberNights, AC_PreferHotelURL, Flight, FL_departure, FL_Depart_Prefer, FL_Depart_URL, FL_Return, FL_Ret_Prefer, FL_RET_URL, Notes, File, Status) VALUES (@Name,@Project,@Objectives,@City,@Country,@Event_Start,@Departure,@Arrival,@Registration,@National_Transportation,@Accomodation,@AC_NumberNights,@AC_PreferHotel,@AC_PreferHotelURL,@Flight,@FL_Departure,@FL_Depart_Prefer,@FL_Depart_URL,@FL_Return,@FL_Ret_Prefer,@FL_Ret_URL,@Notes,@File,@Status)";
varmartins
27-Jan-15 6:52am
View
Deleted
SQLCmd.CommandText = "INSERT INTO Event (Name, Project, Objectives, City, Country, Event_Start, Departure, Arrival, Registration, National_Transportation, Accomodation, AC_NumberNights, AC_PreferHotelURL, Flight, FL_departure, FL_Depart_Prefer, FL_Depart_URL, FL_Return, FL_Ret_Prefer, FL_RET_URL, Notes, File, Status) VALUES (@Name,@Project,@Objectives,@City,@Country,@Event_Start,@Departure,@Arrival,@Registration,@National_Transportation,@Accomodation,@AC_NumberNights,@AC_PreferHotel,@AC_PreferHotelURL,@Flight,@FL_Departure,@FL_Depart_Prefer,@FL_Depart_URL,@FL_Return,@FL_Ret_Prefer,@FL_Ret_URL,@Notes,@File,@Status)";
varmartins
27-Jan-15 6:51am
View
I updated the question
varmartins
27-Jan-15 6:49am
View
Did this didn't work :s
varmartins
27-Jan-15 6:28am
View
Thanks for the suggestion but it didn't work the format didn't change
varmartins
27-Jan-15 5:14am
View
What's happening is that I'm trying to save a date with the format dd-MM-yyyy hh:mm:ss to DB and it says the required format is dd/MM/yyyy hh:mm:ss how to fix this?
varmartins
26-Jan-15 11:14am
View
Which one would you use?
varmartins
26-Jan-15 11:13am
View
I have searched for complete code but only found FullCalendar (Jquery) which I couldn't really get to work and some other options which had to pay and also googled the question I posted here and found nothing useful
varmartins
26-Jan-15 9:48am
View
sure xD
varmartins
26-Jan-15 9:31am
View
Yeah this worked thanks again mate, you're the best ;)
varmartins
26-Jan-15 7:43am
View
Btw you said to save to binary column type? but I'm getting this error "String or binary data would be truncated." and from what I saw this means it's 2 much data for the field but my field already has the maximum size allowd (8000) and it still doesn't fit... should I use a different type of field?
varmartins
26-Jan-15 7:34am
View
Thanks m8, you really helped me ;)
varmartins
26-Jan-15 7:01am
View
<pre>
protected void FileUploadComplete(object sender, EventArgs e)
{
string filename = System.IO.Path.GetFileName(AsyncFileUpload1.FileName);
AsyncFileUpload1.SaveAs(Server.MapPath("Uploads/") + filename);
byte[] file = new byte[AsyncFileUpload1.PostedFile.InputStream.Length];
file = ReadFile(AsyncFileUpload1.PostedFile.InputStream);
Console.WriteLine(file);
}
public static byte[] ReadFile(Stream input)
{
byte[] buffer = new byte[input.Length];
using (MemoryStream ms = new MemoryStream())
{
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
ms.Write(buffer, 0, read);
}
return ms.ToArray();
}
}
</pre>
I used this code but I can't use the file variable in the method I want which is in the same page, any idea why is that?
varmartins
26-Jan-15 5:06am
View
I used this code:
$(document).ready(function () {
$('#<%= accomodation.ClientID%>').find('input:radio').click(function () {
var selVal = $('#<%= accomodation.ClientID %>').find('input:checked').val();
if (selVal == "Required") {
$("#PanelAccomodation").show("fast");
alert("I'm here!");
}
else $("#PanelAccomodation").hide("fast");
})
});
and the alert popped up when I clicked on the RadioButtonList but the panel doesn't show or hide... any ideas?
varmartins
26-Jan-15 4:52am
View
Guys I have this code:
<pre>string date = arrivalDate.Text; //arrivalDate.Text
string hour = arrivalHour.Text; //arrivalHour.Text
string min = arrivalMinute.Text; //arrivalMinute.Text
//Set datestring and the format
string dateString = date + " " + hour + ":" + min;
string[] format = new string[] {"d/M/yyyy h:mm", "d/M/yyyy h:mm:ss"};
DateTime dateTime;
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-CA");
DateTime.TryParseExact(dateString, "d/M/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime);
Console.WriteLine(dateTime);</pre>
but the output is always a default date ... like 01-01-01 00:00:00 or something like that... any ideas?
varmartins
26-Jan-15 4:31am
View
Yeah, I have MS SQL Server 2012
varmartins
23-Jan-15 13:08pm
View
the problem is that my date is not separated like that
varmartins
23-Jan-15 11:16am
View
The date comes together (the day, month, and year) and then hour and minute, these 3 are separate things not sure any of those can help
varmartins
23-Jan-15 11:10am
View
I'm trying like this:
string date = arrivalDate.Text; //arrivalDate.Text
int hour;
Int32.TryParse(arrivalHour.Text, out hour);
string min = arrivalMinute.Text; //arrivalMinute.Text
//Set your datestring and the format
string dateString = date + " " + hour + ":" + min;
string format = "dd/MM/yyyy hh:mm";
CultureInfo culture = new CultureInfo("fr-FR");
DateTime dateTime;
DateTime.TryParseExact(dateString, format, culture, DateTimeStyles.None, out dateTime);
Console.WriteLine(dateTime);
but it doesn't work not sure why but i put a breakpoint at the last point and the date is coming out something like 01-jan-01 or something like that, have to use tryparse or else it doesn't accept the values..
varmartins
23-Jan-15 10:28am
View
I have tried using JavaScript but it isn't working properly not sure why... can you please suggest some sample code?
varmartins
23-Jan-15 9:37am
View
thanks mate ;)
varmartins
22-Jan-15 13:02pm
View
Should it be something like http://localhost:361870/?
varmartins
22-Jan-15 10:20am
View
It's strange because if I change Collapsed="true" to false in the CollapsiblePanelExtender the panel is always showing but if I leave it false and put OnSelectedIndexChanged="accomodation_SelectedValueRequired" on the RadioButtonList and then do this code:
protected void accomodation_SelectedValueRequired(object sender, EventArgs e) {
if (accomodation.SelectedValue == "Required") {
CollapsiblePanelExtender1.Collapsed = false;
}
}
it doesn't work...
varmartins
22-Jan-15 7:40am
View
What is wrong is that the panel won't open when i click "Required" and I would like it to open... also I don't like the autopostback so can you please tell me how to do it with JavaScript?
varmartins
22-Jan-15 4:45am
View
I've been trying functions similar to what paymerich said but nothing is working... I have a panel formed and a radio button list and what I want is for when one of the items in the radio button list is selected for the panel to expand... in this case it's the item "Required"
varmartins
22-Jan-15 4:42am
View
I tried this code:
protected void accomodation_SelectedValueRequired(object sender, EventArgs e)
{
if (accomodation.SelectedValue == "Required") {
PanelAccommodation.Visible = true;
}
}
but it's not working, dont know why
varmartins
21-Jan-15 12:06pm
View
Thanks mate, that worked ;)
Show More