15,881,826 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 Python 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 j snooze (Top 200 by date)
j snooze
5-Jul-22 17:33pm
View
Is this javascript code changes? Is the page still using cached javascript code? Did you version the javascript? If this is C# code behind changes, can you verify the dll dates match between server and local machine?
j snooze
8-Jun-22 17:50pm
View
Well, not that I understand what your requirements are, but I'm guessing the issue is the @sql_Query you are trying to put together. The @POL_NBR variable needs to be outside the apostrophe like this
set @sql_Query = @sql_Query + ' TPCA.POL_NBR = ' + @POL_NBR, if @POL_NBR is a number, then thats fine otherwise you'll have to concatenate the apostrophes around the variable if its a string.
Although any kind of concatenation of SQL to execute from passed in variables should make you think about coming up with a different way to put this together as that can allow for sql injection even if you are passing the variable in as a parameter from .NET, if you're using that parameter to build an SQL statement inside with other SQL to be executed somewhere else, I'm sure there are people creative enough to find a way to break that.
I admit, I feel like this isn't the entire code for either piece so there could be something I'm missing. Hope the above answer gets you further along.
j snooze
29-Mar-22 17:30pm
View
what version of SQL Server are you using? I believe they introduced a function called String_Agg() in 2017?
Here is a little write up on it.
SQL Server STRING_AGG() Function By Practical Examples
[
^
]
j snooze
19-Jan-22 17:56pm
View
That is strange, out of curiosity, does adding a ParentControl.Refresh after the foreach do anything? Wouldn't think you would need that on a winform, but I've seen weirder things.
j snooze
11-Jan-22 17:15pm
View
Its been awhile since I did anything in Unity, and I was doing 3D but it looks like there is a Vector2.MoveTowards function in Unity. Try telling the bullet object to move towards the location of the object you want it to hit.
https://docs.unity3d.com/ScriptReference/Vector2.MoveTowards.html
j snooze
4-Jan-22 17:47pm
View
Well I'm not sure of MySQL exact syntax, but in MS SQL Server or Oracle I know I can do something like this
Select employeeExcuse.EmployeeNo,subq.AbsenseCount
From employeeExcuse
Inner Join (Select employeeInfor.EmployeeNo,Count(employeeAttendance.EmployeeNo) As AbsenceCount
From employeeAttendance
Inner Join employeeFor
On employeeAttendance.EmployeeNo = employeeFor.EmployeeNo
Group By employeeAttendance.attYear
Having Count(employeeAttendance.EmployeeNo) > 20) subq
On employeeExcuse.EmployeeNo = subq.EmployeeNo
Again, not sure if its quite MySQL ready, but if my understanding is correct and you have an EmployeeNo in the employeeExcuse table, it might do the trick.
j snooze
4-Jan-22 17:30pm
View
The SQL doesn't make much sense. In your case statement you have nothing to filter the reason for the specific employee. It selects every attreason from the employeeExcuse table which I don't think you want. What links the reason to the specific employee? Since we don't have the table layouts provided I would assume either there is an attreason field in the employeeattendance table, or an employeeNo in the employeeexcuse table(if the employeeexcuse table is a master table of all possible excuses then I'm guessing the attreason would be housed in the employeeattendance) What about if an employee uses more than one excuse do you need to see all the excuses? My recommendation is to left join to the excuse table on whatever the joining field should be. Hard to give you an exact answer without knowing anything about the tables
j snooze
23-Dec-21 17:22pm
View
you may want to take a look at this
https://stackoverflow.com/questions/42055633/can%C2%B4t-mute-windows-media-player-by-process-id
j snooze
9-Dec-21 17:42pm
View
How come on the RenderPartial you are not passing in a model to the view? Its expecting a view object of MenuModel as evidenced in the partial view code at the very top line of _myprt.cshtml.
@model layoutmenu.Models.MenuModel
j snooze
30-Nov-21 17:26pm
View
Maybe check out this post on how to make a checklistbox in MVC
https://stackoverflow.com/questions/37778489/how-to-make-check-box-list-in-asp-net-mvc
j snooze
11-Nov-21 17:23pm
View
You might be looking to set the datasource of the combo box if you have a list collection/data table of the possible values for your combo box. Then look for using the value and display properties so you know which value to grab while displaying a user friendly description for the user. If I read the problem correctly.
j snooze
5-Oct-21 17:18pm
View
you need to retrieve the html source code from the url supplied in your text box. Right now it looks like you are trying to find the title by searching the URL link...you need to get the pages HTML first.
j snooze
10-Sep-21 16:36pm
View
if I had to guess, take the Random.Range out of your Vector3 spawnPos initialization. Make variable equal to that random range and use that in the constructor instead of the Random.Range function call.
int spawnLimitRange = Random.Range(spawnLimitXLeft, spawnLimitXRight);
Vector3 spawnPos = new Vector3(spawnLimitRange, spawnPosY, 0);
j snooze
31-Aug-21 17:29pm
View
I'm not too familiar with excel interop, however it appears there is no Delete function for a columns collection. I wonder if the single column object can be deleted so get your collection of columns using xlWorksheetNew.Columns["P:Q"] and maybe do a for each column in that columns collection? Worth a try if the above code you supplied is not working.
j snooze
17-Aug-21 17:57pm
View
you could always add a hidden field to each row giving it a row number value or some type of unique identifier. You can pass that around your javascript functions or whereever you want so you know which row you're editing and which row to update/delete.
j snooze
5-Aug-21 17:43pm
View
Do you have an IsPostback logic or anything in your pageload erroring or preventing the code from getting to the SelectIndexChanged events? Might try debugging there to see if anything is erroring out before it gets to the SelectIndexChanged because the PageLoad event always runs on postback before the subsequent events are fired.
I would at least start there.
j snooze
27-Jul-21 17:39pm
View
I may be a little rusty on my MVC, but I believe you're controller methods name needs to match the name of the cshtml file(so change Get() to Index()), also if you are submitting a form, that would be an http post, not a get.
j snooze
14-Jul-21 17:25pm
View
You haven't described what the result of your code does(errors?). However looking at your code one thing you may want to try (assuming the ajax call is working) is putting the last three lines of your imagechange function (var coronal_bk = document ....) into a completely separate function, and call that function in the "Success" section of the ajax code. Something like
success: function (msg) {
UpdateImage();
}
This will most likely be necessary because ajax is asynchronous and will run the last 3 lines in your "imagechange" function before the ajax call to the web server completes. By putting a function call on success, this tells javascript I want to run this function after my ajax call completes.
Hope this makes sense.
j snooze
8-Jul-21 17:50pm
View
if you go to that specific site and put in a sample entity, do you see a querystring that shows up after the main URL? like https://www.ExampleUrl.com?entity=12345 ? you should be able to mimic that. even if you do a google search or something you'll see https://www.google.com/search?q=how+do+I+do+that......where I put "How do I do that" on the search text box
j snooze
11-Mar-21 17:45pm
View
that seems like it would be your issue then. I am not familiar with the API you're using, but if you're passing a null "firstAccount" on this line
var authResult = await PublicClientApp.AcquireTokenSilent(scopes, firstAccount)
that's most likely your issue, unless I'm misunderstanding.
j snooze
11-Mar-21 17:30pm
View
Probably the obvious question, but when you were debugging right before the call that errored, did you verify the "firstAccount" had something in it? and if it did, whatever was in it had a valid value?
j snooze
26-Feb-21 17:11pm
View
Why not put the 3 second wait and submit in the javascript, once you post back to the server code you can't mess with the client side until it renders again.
I see the dollars signs so I'm assuming you are using jquery already, it has a submit, so just put an onclick event on your input and make it a type button instead? This is just a suggestion, I do not know your specs or why you would put a 3 second delay on the server side code.
j snooze
24-Feb-21 17:14pm
View
Why not have the json return the url of the page you want to redirect to, or if its the same page and you are just trying to refresh it to show that an item has been deleted, then on ajax call success set the current window.location property in javascript to the current page?
j snooze
9-Feb-21 17:42pm
View
Don't know what to tell you here, assuming that you have perhaps removed some code because I don't think you need data.d or the extra comma after the value.
Some working code I have is like this...
success: function (data) {
response($.map(data, function (item) {
return {
label: item.FullName,
value: item.FullName,
uid: item.Id
}
}));
j snooze
29-Oct-20 17:54pm
View
Although probably inefficient you could probably convert to a double then get your number string like this.
Convert.ToDouble(drContract["Budget_Amount"]).ToString("N");
j snooze
27-Oct-20 17:53pm
View
Before figuring this out, be sure to google and learn about parameterized queries, or you'll soon find out the wonders of SQL Injection.
Definitely use debug and break points to step through the code. Verify the value in the WE variable is what you expect from your drop down and that it should return something from SQL.
j snooze
27-Oct-20 17:50pm
View
A simple google search would do the trick. Just look for "c# switch statement greater than".
Google first, ask questions second on here. If we can find it within seconds on an internet search, you can too. Its a wonderful tool for figuring out how to do things.
j snooze
21-Oct-20 17:28pm
View
if this is truly your exact code make sure your SQL statement is syntactically correct. seect should be SELECT...
j snooze
23-Sep-20 17:21pm
View
generally you can just take the 1st day of the next month and subtract a day to get the last day of any particular month. in c# you could take the date of 9/1 and do a .AddDays(-1) on the DateTime Object.
j snooze
5-Aug-20 17:47pm
View
I realize thats mvc for .net framework, but this suggests the httpcontext.request is still the same for .net core...
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-context?view=aspnetcore-3.1
j snooze
5-Aug-20 17:45pm
View
This may help you with what you're looking for.
https://stackoverflow.com/questions/34298318/how-to-access-the-request-object-in-an-mvc-6-controller
j snooze
10-Jul-20 17:41pm
View
Dumb question on my part as I'm not sure I understand your question. you say the file is deleted, but it gets the first file data everytime? so which is it? The file is deleted or it gets the first file data?
Also one thing I wondered is how your connection string knows where the file is, unless you are running your exe in the folder location of all the excel files. Pretty sure the connection string needs a full path and it appears you are only providing a file name. You could do
string szConnectionString1 = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + Path.Combine(strPath,strFile) + "';Extended Properties=\"Excel 12.0;HDR=YES;\"";
j snooze
18-Jun-20 17:43pm
View
You may want to have a look at this link that describes how to make a datagridcolumn a datetimepicker column.
https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells?redirectedfrom=MSDN
j snooze
26-May-20 17:08pm
View
400 can be any number of things. Is the data your posting what the service is expecting?(correct format), are the headers correct? Is the service setup to allow requests from your code?(CORS). Things to check out. Obviously without knowing much other than you are trying to call a webservice, we can only throw out possibilities.
j snooze
21-May-20 17:22pm
View
Probably a dumb question on my part but if its regular javascript why do you have this
function test() {
@{
Console.WriteLine("test function");}
}
instead of
function test() {
Console.WriteLine("test function");
}
I thought the @ symbol tells the page its c# code, javascript shouldn't need that to execute. Granted I have not played much with the new blazor stuff.
....nevermind, perhaps you are trying to run c# code in a javascript function??
j snooze
14-May-20 17:30pm
View
You're going to need alot more info posted than this. We can't see your computer(so we have no idea what setting you are talking about that you changed), your code or anything you've tried. Please improve your question showing what you are trying to do, and the code you've written. It will be easier to help that way.
j snooze
12-May-20 17:48pm
View
along with what Richard says about using parameterized queries. I see you create a datatable and do nothing with it. Why not fill the datatable after getting the first reader, then close the first reader and get your second reader data?
j snooze
7-May-20 17:47pm
View
This is not exact syntax but google around to get that. First start your rowcount at 0 instead of 1 so you have a row zero, which will help with the next part. Next give all the elements holding values you want to calculate a name attribute even if its a table sell so
(I can't put html stuff in here or it will encode it so just know greater than/less than signs should be used in your html)
(html)
td name="discountPercent" class="productDiscount" value="@item.Discounts.First(d => d.ProductID == item.ProductID).DiscountPercent"
td name="productPrice" value="@item.ProductPrice" class="productPrice"
td name="quantity" type="number" min="0" class="input" style="width: 70px;"
td name="Sum"
now in your javascript instead of the jquery firing on keyup create a function like
(javascript)
function onCountChange(rownumber){
var discntPct = document.getElementsByName("discountPercent");
var prodPrice = document.getElementsByName("productPrice");
var qty = document.getElementsByName("quantity");
var sum = document.getElementsByName("Sum");
sum.innerText = qty[rownumber] * prodPrice[rownumber] * discntPct[rownumber]
}
So essentially you can use that row number you already have to reference each control if you give each control or column that you want to use in the calculation a name. So all the discount percent TD columns have a name you can query with the getElementsByName, which creates an array in javascript of all the elements with that name. Passing the row number to the javscript function tells the function which row count changed so you can do your math on that row.
Hopefully this helps point you in the right direction. this can all be done with jquery as well, I just went a little old style.
j snooze
5-May-20 17:06pm
View
There are many ways you could do this, you could getElementsByTagName and grab the rows. you could put a certain class or name on all the elements you want to sum and use jquery to grab all of them, or regular javascript getElementsByName. many options to choose from.
j snooze
3-Apr-20 17:38pm
View
You may want to check out
https://raresql.com/2013/01/10/sql-server-split-string-into-rows-based-on-multiple-delimiters/
j snooze
2-Apr-20 17:38pm
View
I concur with gggustafson. Use reflection to dive into objects, the properties and such.
j snooze
3-Mar-20 17:55pm
View
I'm confused like the other poster, however you might consider putting this at the top of your query to have a "table" of financial years.
With FiscalYears As(
Select to_date('2019-04-01','YYYY-MM-DD') As BeginDate, to_date('2020-03-31','YYYY-MM-DD') From dual
Union
Select to_date('2018-04-01','YYYY-MM-DD') As BeginDate, to_date('2019-03-31','YYYY-MM-DD') as EndDate From dual)
Select * from transactiondata where transctiondate between (select min(BeginDate) from FiscalYears) and (Select max(EndDate) From FiscalYears)
you could also use those years to group the transactions by as well by specifying which year the transaction date is between in the FiscalYears subquery table.
This may not be helpful at all, but again i'm not sure exactly what you are wanting help with.
j snooze
4-Dec-19 17:26pm
View
Then remove it from the for each loop and put the html just for the title above the for each loop.
j snooze
3-Dec-19 17:30pm
View
Are the results of each response layout EXACTLY the same from each API? Otherwise you will have to maybe create a class with the properties of the values you want and fill an ienumaerable list from the results of each api.
Since we don't know anything about the API's you are calling its tough to answer the question.
j snooze
2-Dec-19 17:30pm
View
This link may help you out.
https://www.devhut.net/2019/11/14/access-bug-error-3340-query-is-corrupt/
j snooze
29-Nov-19 17:24pm
View
Why not create 2 random colors, store them in an array with 2 elements, and flip between the 2? or make color variables set each one to a random color and them flip between those 2 variables?
j snooze
14-Nov-19 17:53pm
View
that is your problem then. as soon as you introduce the "+" into your textbox that becomes a string value you can't convert a string to a number(unless it actually is a number).
I notice you have a variable called string parts[] which is the expression split into an array. Pretty sure you should loop through that parts array and sum the numbers.
j snooze
14-Nov-19 17:27pm
View
When you debug, do you see the values in the datatable column "Contents" ? do you have any error trapping where it can't convert the contents to a double? Seems like this should be fairly evident what is happening with some simple step through debugging.
j snooze
4-Nov-19 17:33pm
View
I'm guessing you want your SQL results something closer what this little SQL sample would provide...this is assuming your BCD value is consistently 1 character and child values are continually 2 characters long appended to the root character. So this just returns the parent as the BCD less 2 characters... Since I don't know if this is the case or not, it is something to spark an idea to maybe help you finish whatever you are trying to accomplish.
select case
when len(BCD) = 1 Then BCD
Else substring(BCD,1,len(BCD)-2)
End as Parent,
BCD,
Description
from Balance_Sheet where type = 'S'
j snooze
16-Sep-19 17:52pm
View
Your code doesn't make much sense to me. When addBox text changes you set a variable named addOne to the number in the addBox.Text. Which is fine, but you don't do anything with the addOne variable. Its only locally scoped as well so you set an unused variable to the number in the text box. Seems like a waste of processing time. No where in the code are you adding up totals of any numbers. Which is what it sounds like you want to do??
j snooze
10-Sep-19 17:20pm
View
This link might help point you in the right direction.
https://stackoverflow.com/questions/29155328/mvc-multiselectlist-posts-null-when-form-is-submitted
j snooze
23-Aug-19 11:52am
View
Are you sure the GetAdditionalStaffInfoModel property is called "Name", and not "DisplayName"? You don't have the code for that object pasted here, but I see DisplayName referenced in a linq query.
Otherwise if that doesn't fix it....
I did have something funky like that happen to me (i have it as a check list box)instead of using datasource I did resort to a for loop similar to below(don't ask me why it displays the object name text vs the property value, I use datasource in other listboxes with no issue).
foreach(GetAdditionalStaffInfoModel model in staffEmails)
{
AdditionalStaffEmailListBox.Items.Add(model);
}
AdditionalStaffEmailListBox.DisplayMember = "DisplayName";
j snooze
23-Aug-19 11:04am
View
The one where you populate the list box.
So staffEmails is your List object. that should be your datasource
Now (if I read your code right)
AdditionalStaffEmailListBox.Datasource = staffEmails;
AdditionalStaffEmailListBox.DisplayMember = ????; //name of the object property you want to display
AdditionalStaffEmailListBox.ValueMember = ????;
that can replace the whole for loop that fills your listbox. Setting the datasource to your List<> collection should fill the listbox in for you.
j snooze
23-Aug-19 10:01am
View
Try putting it there anyway. I do believe its valid, intellisense may not be displaying it properly.
See this link for a sample where they use it on a listbox
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.listcontrol.datasource?view=netframework-4.8
j snooze
23-Aug-19 9:50am
View
databinding to a list would replace the "for" loop you have. You can just comment that out if you want to save it in the event this doesn't work out for you. although it should.
j snooze
22-Aug-19 17:35pm
View
It seems to me that what might work better is if you bind your list object to the listbox using a databind, and then setting the display and value properties to whatever you want to show. Then when you get the SelectedItem(s) of the list box you can get the getrequestorinfomodel object back out for each item so that the entire object is bound to each list item object.
usually its something like
listbox.Datasource = staffemails
listbox.Displaymember = "DisplayName"
listbox.ValueMember = "some identifier here? or email if you prefer"
but then you can get the
var selecteditem = (getrequestorinfomodel)lisbox.SelectedItem
and then you can get the email address of
selectedItem.Email
j snooze
2-Jul-19 17:28pm
View
May I recommend doing an internet search for creating a database connection and then visiting connectionstrings.com to get the connection string you need for an excel document. No one here is going to write a whole program for you, but we are happy to see what you tried, or in this case point you in the correct direction to start.
j snooze
1-Jul-19 17:25pm
View
Deleted
Is there a reason you wouldn't want to set the multi select property before someone has selected a value in the listbox? Like in the form load, or through the properties (this looks like windows forms?)
Not sure why you are creating a whole new listbox object inside the seleced index changed. The list box already exists, you can just reference it. I'm not understanding the code at all. Maybe its just too late in the day for me.
j snooze
20-Jun-19 17:09pm
View
Web API's no matter the tech, should be agnostic to whatever technology you choose to call them with. Shouldn't matter if you're calling a webapi through javascript, .net, java, python etc....
j snooze
30-May-19 17:11pm
View
why wouldn't you want to do what you do with the combo box on the text box. Wouldn't you rather have it
Textbox tx = (Textbox)ctl;
if (tx.Text.Length == 0)....
Why have a specific textbox name?
j snooze
23-May-19 17:30pm
View
This looks like it might point you in the right direction.
https://stackoverflow.com/questions/6882098/how-can-i-get-text-formatting-with-itextsharp
j snooze
19-Apr-19 17:54pm
View
Why do you have
IList<contact> contactList = new List<contact>();
instead of
List<contact> contactList = new List<contact>();
?
j snooze
15-Apr-19 17:48pm
View
Does the stored procedure return fields with the same name? I would search the internet looking for these issues, you'll probably find something that matches closely to your issue.
j snooze
15-Apr-19 17:28pm
View
Do you have multiple controls on the report with the same name or something? It doesn't know which control to bind a field to if there are controls with the same name. Not sure if thats your issue, but it is one possible scenario with the information you've given.
j snooze
19-Mar-19 17:07pm
View
If you get an error you should post the error message. Since we can't see your computer all details are necessary if you want help diagnosing. Is it possible textbox2.text is null so you can an object reference error or something?
j snooze
27-Feb-19 17:15pm
View
Also keep in mind if this label is an asp.net control label, sometimes on master/child pages asp.net changes the id to make sure they are unique between pages, when looking at your page in a browser do a right click > view source on the browser and find the lblConfirm_Email label in the actual HTML that asp.net outputs, the label may be renamed with extra characters to make it unique so the master and detail page don't run into issues.
j snooze
27-Feb-19 17:13pm
View
This makes sense. From what code is posted, I don't see an html control or any control named lblConfirm_Email on the parent page html you posted.
j snooze
27-Feb-19 17:02pm
View
Sorry, my misunderstanding.
Maybe this link will help you out. Looks like it might be as simple as putting the [WebMethod] attribute on the server page method you want to call.
https://stackoverflow.com/questions/5331986/how-to-use-ajax-with-asp-net-webforms
j snooze
26-Feb-19 17:12pm
View
asp.net code is run on the web server. If you want everything on the client either make a client app, or figure out how to create an excel file using all javascript. Web pages are meant to talk back and forth between server and client.
That is if I read your request correctly.
j snooze
5-Feb-19 17:44pm
View
Are you getting a error or anything? I display a partial view myself. Something like this. Based on an activity dropdown change, I ask a question. The jquery basically builds the partial view and grabs the html, then injects it into my main form.
$(document).ready(function () {
$('#ddlActivityType').change(function () {
/* Get the selected value of dropdownlist */
var selectedID = $(this).val();
var questionUrl = $(this).data('qt') + '/';
/* Request Questions the partial view with .get request. */
$.get(questionUrl + selectedID, function (data) {
$('#questions').html(data);
$('#questions').fadeIn('fast');
});
});
j snooze
21-Jan-19 17:17pm
View
Once your data is in the datagrid you can usually loop through the rows in the datagrid and grab the cell values by column.
Just search the internet for looping through datagrid rows and columns you'll get something like
foreach(DataGridRow row in MyDataGridName.Rows)
{
row[columnIndex or Fieldname].Value
}
That should get you through the grid to grab the values. Obviously that is not exact syntax, just some pseudo code to help get you started. I'm also assuming the data is already in the datagrid, you just want to know how to get at it to put it on the receipt.
j snooze
18-Jan-19 17:28pm
View
my guess is because you are specifying the product id in your linq query. how is your database context setup if someone selects the same product? Does it add a second line in the database or update the quantity? do some debugging and look at the database behind your code after it adds a product.
j snooze
8-Jan-19 17:50pm
View
I'm not sure you can pass a collection in an action link because essentially its creating a query string(I think) you may have to post the data to the new page instead and then from the post method on the new page/controller, save your changes, and display the data or whatever it is you're trying to do.
j snooze
4-Jan-19 17:37pm
View
a 500 error usually means the server side code is failing, not the client side javascript.
j snooze
6-Nov-18 17:32pm
View
wouldn't you just put the async in your method definition?
https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/async/
j snooze
24-Oct-18 17:52pm
View
I certainly am not going to hand out the code and do the work for you, but in my Model, i returned a datatable and then looped through the datatable like you would normally in server side c# on the view. and each column in that row.
foreach (System.Data.DataRow row in Model.Rows){
@for (int c = 1; c < row.ItemArray.Length; c++){ (your data here)}
something like that. Just add a datatable to your model that you return, or just return the datatable as the model your view accepts. Loop through.
j snooze
22-Oct-18 17:39pm
View
I personally put my authorizations at the controller level with the [Authorize] attribute(you can do specific roles there as well, or even on certain actions). I leave it off the account controller where people login/forget password etc...
j snooze
22-Oct-18 17:15pm
View
if you're in c# I very much recommend you study up and search examples on using the newtonsoft json nuget package. wonderful for turning json objects into C# objects.
j snooze
22-Oct-18 17:13pm
View
Not sure I get the concept, you can't really show 2 web pages at once unless you are using frames, or its like a dialog page opened up. Or are you just trying to pass the check box value to the next page?
If its frames or a dialog you can use window.parent or window.opener in javascript to get at stuff. If its passing the value, you can use session variables, page posts, querystrings etc...
j snooze
17-Oct-18 17:23pm
View
Really depends on the data you're working with. If the number of graphs are static and only a couple, checkboxes are probably fine, but if the list of graphs is dynamic and could be many, I would lean toward listbox if that helps. Too many checkboxes would make the screen way too busy. Don't know if that helps, but I'm basing off of the small bit of info given. Keep in mind its only opinion. Any interface thats intuitive and easy to use for users is ultimately what you want.
j snooze
11-Oct-18 17:27pm
View
Is there a reason you wouldn't just use a css file instead of trying to do everything through javascript?
j snooze
3-Oct-18 17:31pm
View
could be CORS (something similar to this...https://stackoverflow.com/questions/36543244/cross-origin-in-ajax-call-using-asp-net-mvc) I can't say for sure obviously, but its somewhere to start looking.
j snooze
1-Oct-18 17:43pm
View
would something like this work? You might be able to pass your string values to the new DateTime, I can't remember off the top of my head. Either way a true parameterized query would be best vs string concatenation.
https://stackoverflow.com/questions/19519831/c-sharp-and-ms-access-queries-with-date-range-issue
j snooze
24-Sep-18 17:20pm
View
This seems more like a "Do my work for me" post than a "Help me with an issue I'm running into" post. We only answer the latter. We don't do peoples work for them here. We have enough of our own.
j snooze
24-Sep-18 17:17pm
View
Improve your question. If I told you "My computer isn't working, how do I fix it?" you would obviously have some questions. You would need "isn't working" defined. Is the screen frozen, can you click something, is there an error message etc... Same with errors if you are getting errors or anything, that can help us greatly in helping you.
j snooze
13-Sep-18 17:50pm
View
You could do a list object for each full comma delimited line. Then when looping through each line do a .split on the comma into a string array and loop through the length of the string array. Just one way to do it, I'm sure there are many and possibly better. I don't know if that helps because I don't really know your intentions are with the data.
j snooze
11-Sep-18 17:22pm
View
Is something wrong with this line, or is the model property actually misspelled? (Latidude?)
p.Add("SiteLatitudeDirection", model.SiteLatidudeDirection);
j snooze
22-Aug-18 17:22pm
View
Are you sure the previous node isn't just keeping its color change? You would have to track the previous node and change the color back on a new search...or is there a post back on each search?
j snooze
13-Aug-18 17:14pm
View
Well, if there is always a name you could just check to see if the current line you are looking at is a name...if it is concat Environment.Newline BEFORE adding name and subsequent fields next comma delimited line. That way you don't have to care if there isn't a nonexistent field after that.
If it matters you can check to see if its the first record and not add a new line before the name the first time around.
j snooze
9-Aug-18 17:34pm
View
It is very possible, however the database should probably be on a server running 24 hours a day 7 days a week. The server would need the port (usually 1433) open for receiving and listening for requests to the server. So if your server has a firewall on, you'll have to make sure its not blocking that. Then just modify your current connection string to point at the new server. If you are not sure about modifying the connection string go to connectionstrings.com for an idea. Hope that helps a little.
j snooze
3-Aug-18 17:27pm
View
does GetType(???).FullName not work for you?
j snooze
24-Jul-18 17:39pm
View
I think if you debug and view what the value of home.global.mon or tbl_col is, you will see the issue. Also, other people will tell you this, but you should use command parameters instead of concatenating a string together. That leaves you open to sql injection attacks.
j snooze
17-Jul-18 17:38pm
View
you have to split the "hihihi" up before you can put them on separate lines.
If you are trying to put text together to output onto a text file with carriage returns you can concatenate Environment.NewLine on your string as well, otherwise refer to previous answers if you are trying to output to console.
j snooze
10-Jul-18 17:15pm
View
are you missing the closing pre tag, or did you just omit that from the xml posted? Every tag needs and open and a closing tag for valid xml.
j snooze
9-Jul-18 17:28pm
View
Now your query will need to have a bit more logic incase the exact amount you are trying to distribute is not equal to the exact running total. But the following sample I used in a temp table will basically bring back results with the last column being a running total of how much stock you need to fill that bill number. You would be able to select just the rows that you need to update and with some c# looping calculate how much each row gets. To get the idea of what this query does, remove the where clause and run it to see that the "numberneeded" is a running total of how much is needed to make the stockout = stockin. (I just did a temp table with a similar name and similar column names, modify to your specifications).
Select *
From (Select billno,item,stockin,stockout,stockinhand,sum(stockin-stockout) over (order by item,billno) as numberneeded
from #stock_recieve) a
Where numberneeded <= 100
j snooze
6-Jul-18 17:07pm
View
pretty sure if you debug this and look at the value in your "line" variable its probably blank. So substring function yelling at you saying the index of 0 and length of 1 doesn't exist. You'll only find that out by debugging.
j snooze
5-Jul-18 17:16pm
View
If Thaddeus says your code seems to work fine, and you don't agree, try clearing your temp internet files. I've banged my head on many desks wondering why my javascript changes didn't take, only to realize that the page had been cached.
j snooze
21-Jun-18 16:59pm
View
Well if I read your code correctly, I would replace the hard coded Stringbuilders in your Connect method and just return the connection string you get back from the configuration manager. I'm assuming those are the connection strings you are using now to connect to your database?
j snooze
20-Jun-18 17:45pm
View
Just as an FYI, if you have connection strings in your config file, and have the System.Configuration added to your project, all you have to do to get the connection string from the connection string section is this.
ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString
I'm assuming in your config file you have
the connectionStrings element along with the --add name="DefaultConnection" connectionString="my server connection information here"--
j snooze
15-Jun-18 17:24pm
View
Is this a webform or a windows form? Either way you have to connect your xt_tanul_irszam_Leave to an event on the text box. Something like a lost focus event.
j snooze
13-Jun-18 17:18pm
View
try a JSON.parse() on your results(i.e. var products = JSON.parse(product), that should set the "products" to an array of returned objects, then you can just loop through and append items to your list box. You might be able to get away with just using an each and looping through this link may help some. https://stackoverflow.com/questions/21007304/populate-listbox-options-with-result-of-an-ajax-call-using-query-in-spring-mvc-e
j snooze
6-Jun-18 17:09pm
View
did you debug and step through to verify "return" is hit? Did you also put a debug stop on your redirect to the home page to verify that is NOT getting hit at any time?
j snooze
5-Jun-18 17:13pm
View
you could try increasing your timeout, but seems to me the sql code should be faster so I would focus on making sure its efficient.
j snooze
4-Jun-18 17:57pm
View
Many students post their homework questions on here without trying. My remarks are not snide. You chose to read them that way. I was being honest with someone who put the comment "I haven’t tried anything I need help with it", you could have put down that all your google results showed regex examples. That means you tried something and put forth an effort. There is very little to go on here. If http or https will prefix each url you could split the string by that, but then again I don't know if you are just counting the text or counting the URL's, or counting the amount of text in each URL. Assume we know nothing of your business specs because we don't.
j snooze
4-Jun-18 17:36pm
View
you're subject line and problem statement are 2 very different things. Count the amount of text or count how many URls' you have. First of I would learn a little about programming in the language you prefer because basic problem solving will be needed to become a programmer or developer. So you should try something first, search for counting text or sections of text in your preferred language. If we do it for you, we're hurting you more than helping.
j snooze
24-May-18 17:30pm
View
well if this is a textbox where the text is highlighted you can just do the textbox name and use the SelectedText property.
j snooze
16-May-18 17:17pm
View
What documents are you talking about? If you think you're going to write c# code to access every web server out there to search through the documents contained on that server then you would be a hacker and that website would have a major security hole.
I don't know what else you would be asking if you aren't talking about the html of a page.
j snooze
15-May-18 17:43pm
View
I do not see an error posted. What seems to be the issue? are you saying the above code is updating every record in the table instead of just the customer id you are sending?
j snooze
11-May-18 17:55pm
View
This doesn't seem like a well designed idea, but you'll need to create a CREATE TABLE statement off of the structure of the excel columns. So loop through the column headings to create the field names from the excei file, run the create table, then insert the rows of data from the excel file. not knowing the extent of your file, I'm assuming it has headings so you know what is in the columns.
j snooze
9-May-18 17:47pm
View
I'm hoping that is what you are asking because if you truly do not know how to divide something by 12, programming may not be the right field for you...or any profession that involves math.
j snooze
9-May-18 17:46pm
View
If you want it done as soon as they leave the field, then should probably be a javascript function, otherwise a postback will be required.
j snooze
2-May-18 17:18pm
View
Is this sensitive data information? You could just do a query string value
Page2.aspx?method=New or Page2.aspx?method=Exist and just read the querystring value in the page load of page2.
j snooze
17-Apr-18 17:51pm
View
Did you try
cmd.Parameters.Add("@DATE", SqlDbType.DateTime).Value = Convert.Datetime(DropDownList2.SelectedValue)
j snooze
17-Apr-18 17:30pm
View
are you missing the "option" tags in your Select? By the way there are html drop down helpers in MVC so you don't have to do a for each.
j snooze
10-Apr-18 17:19pm
View
Sure enough, look in your populategridview where you open your sqlconn. Also you have to tell the SQL command what sql connection you are using.
cmd.Connection = con.
so 1. don't forget to open you sql connection to your server and 2. make sure your sql command knows what connection it needs to use to execute the statement.
j snooze
10-Apr-18 17:06pm
View
lucky for you the fix is easy. You've got the insert statement and the parameters filled in...but you never actually told the command to execute :)
cmd.ExecuteNonQuery(); should do the trick assuming your SQL syntax is correct. (Right before the index++)
j snooze
6-Apr-18 17:13pm
View
I guess we're assuming you can at least somewhat read the code that you pasted here. If you cannot, then we can't help you much because as of now it looks like the user name is stored in the session variable (Session["User"]), and it appears someone as attempted to fill in the username parameter in they with the entire query value vs just the username.
Based on this line cmd.Parameters.AddWithValue("@Username", strquery.ToString());...
j snooze
5-Apr-18 17:10pm
View
if you open your task manager after trying to debug, do you still see vscompiler.exe, vshub.exe, and possibly msbuild.exe or microsoft.vshub.server.httphost? Close your project, Kill all of those tasks, then in your project folder delete the bin and obj folder. Reopen your project and try again.
j snooze
2-Apr-18 17:39pm
View
https://msdn.microsoft.com/en-us/library/7d723h14(v=vs.110).aspx
This suggests that it does have ToUpper.
j snooze
2-Apr-18 17:09pm
View
Are you sure you coded this correctly? .Upper() should work.
Your new line check should be
while (!question.Upper().Equals('A') || !question.Upper().Equals('B') && !question.Upper().Equals('C') && !question.Upper().Equals('D') && !question.Upper().Equals('E'))
j snooze
26-Mar-18 17:44pm
View
what is itemData? Why not set itemdata to null when the child form is closed?
j snooze
23-Mar-18 17:29pm
View
what if on your cell click or double click even you did something like this
DataGridViewRow CurrentRow = poreziDataGridView.Rows[poreziDataGridView.CurrentCell.RowIndex]
j snooze
22-Mar-18 17:12pm
View
Couple suggestions on this url that might be worth trying.
https://stackoverflow.com/questions/4269268/initial-connection-to-sql-server-connection-is-slow-why
j snooze
21-Mar-18 17:29pm
View
This may help you out.
https://stackoverflow.com/questions/2934295/c-sharp-save-a-file-from-a-http-request#2934308
its in c# but you should be able to convert it over to VB
j snooze
20-Mar-18 17:34pm
View
Is this being posted to your page from an upload file control? Also is this webforms or mvc?
j snooze
16-Mar-18 17:40pm
View
many ways you can do this. You could set a boolean value inside your validation if logic, set it to false on a validation failure, then put an if condition around your text file save. Right now you have no condition surrounding the text file save so it will naturally save every time no matter what.
j snooze
16-Mar-18 17:36pm
View
You haven't said anything about your setup or database. We could only guess like you, but you know more than us. Is the data field numeric only? or does it have a character limit? What is the error you are getting when it stops if any? what happens when you debug it it? Good info to provide for people who have absolutely no idea what your setup, environment or everything you've tried.
j snooze
14-Mar-18 17:18pm
View
do you have to put tostring() on the window height? I can't remember if javascript makes you convert an int to a string when concatenating to a string.
j snooze
13-Mar-18 17:11pm
View
What is the problem or error you are experiencing?
j snooze
12-Mar-18 17:24pm
View
depending on your setup, you might be able to attach your debugger to the host. Search for ".net remote debugging" to get the setup of it. Sometimes those issues that work locally, but not on the webserver can be a pain to find. Good luck!
j snooze
9-Mar-18 17:25pm
View
Did you debug?
j snooze
28-Feb-18 17:20pm
View
This might help you out.
https://stackoverflow.com/questions/91747/background-color-of-a-listbox-item-winforms
j snooze
27-Feb-18 17:14pm
View
I don't know what that dll is, but it its written in c# you can download jetbrains dotpeek to decompile .NET dll's. Otherwise you'll have to search for a different decompiler if its written in some other language.
j snooze
26-Feb-18 17:20pm
View
well you could move your btnSubmit_Click logic into a separate method, then you can call that method from the btnSubmit_Click method, and from Timer1_Tick when it hits zero (where you check if TimeAllSecondes > 0).
j snooze
23-Feb-18 17:26pm
View
what is being cached that you need refreshed? Do you have some javascript files that you change? Are you saying you only have the index.html file and you make html changes to it and those get cached? If its javascript files that's a pain point for most people and versioning the file seems to be what a lot of people do.
j snooze
23-Feb-18 17:23pm
View
You can't fill the second drop down without knowing what bike they selected. You need to fill the second drop down based off of the bikes selected index change or something likethat. Currently your query is telling the xml to give you all the Size element tags for every bike. First query the bike nodes (use SelectSingleNode where the id tag is whatever number they selected lookup xpath expressions for exact syntax) then once you have just the bike node they selected, you can use an xpath query on that node to query the sizes inside that node. Is that what you are looking for? This is a multiple step process, if I understand what you are trying to do.
j snooze
21-Feb-18 17:27pm
View
are you rebinding your datagrid to the datasource after adding a row?
j snooze
21-Feb-18 17:21pm
View
Why would you not use the javascript setInterval function? Its got a built in timer you can tell it to run a function every x milliseconds?
Example...this would run every 3 seconds(since the time parameter is in milliseconds)
setInterval(function(){ alert("Hello World!"); }, 3000);
j snooze
21-Feb-18 17:17pm
View
You need to describe the issue/error you are getting from the current code. Right now I'd say your biggest issue is the while(password.length < 6 && Password.length > 12...)it can't both be shorter than 6 and longer than 12 at the same time. Need to rethink your logic on that one.
j snooze
20-Feb-18 17:36pm
View
If you look at the administrative panel in the services and find the mysql service what is the path of the exe it is looking for? Is the exe there?
j snooze
19-Feb-18 17:08pm
View
This might be more helpful.
https://www.w3schools.com/tags/att_input_accept.asp
j snooze
16-Feb-18 17:04pm
View
You shouldn't be getting an error message. What is the error message you are getting?
j snooze
15-Feb-18 17:00pm
View
if you open your SQL Server configuration Manager on USMAN-PC and look at the services is the SQL Server Browser service running?
j snooze
13-Feb-18 17:08pm
View
you may want to post the error message, and the line it errors on when you debug it.
j snooze
8-Feb-18 17:38pm
View
That error can be caused by the platform you chose to compile the app as. x86, 64 or any cpu. Also I would recommend using a parameterized query for your insert like you do on the select statement.
j snooze
7-Feb-18 17:50pm
View
It might be worth your while to see if the website host has an FTP or better yet an SFTP spot you can download directly from.
j snooze
7-Feb-18 17:29pm
View
When you build your table, use the primary key from the record on your button press and pass that to a function that calls the delete of the record in your database.
j snooze
7-Feb-18 17:23pm
View
500 error usually means your server side code is erroring out on the web server, if you have a way of checking logs or creating your own log to trap errors, that would be your best bet to find the issue.
j snooze
7-Feb-18 17:20pm
View
This might help you out.
https://stackoverflow.com/questions/34690108/c-sharp-scanning-com-ports-for-specific-input
j snooze
5-Feb-18 17:35pm
View
Well, I'm not sure I fully understand the code you have laid out here, but you have two functions with the exact same name "openWindow" if this is on the same page how does your page know which function to call? You can't have a function with the exact same name and expect the code to figure out which one you mean. Unless you overload the function which means the function has the same name but different parameters. Then the code can figure it out which method it should call. I would modify your openwindow function to take the date AND the page it should redirect to as parameters.
j snooze
5-Feb-18 17:26pm
View
not sure I quite understand why you would have a total quantity on the total price. Much of the database layout and app don't make sense. In most order situations(and maybe you were just trying to be brief) there would be an orderheader table and the detail table which you have outlined. Right now if you had more than one order, you wouldn't know which items are on which order. Also, why are you storing the total? Just storing the item, quantity and purchase price saves database space because you can write functions to calculate or calculate in your select statement.
j snooze
31-Jan-18 17:34pm
View
I don't see the ajax call at all. All you posted was the c# of a view (I'm assuming mvc?)
You need to do something like this for your ajax call. Its not exact code but you can google around for anything additional you need for posting data to a url.
$.ajax({
url: //**Your ajax save url here,
success: function() {
//**change class of table cell here
}
});
j snooze
30-Jan-18 17:17pm
View
I just wanted to verify the errors were similar between the two. If I take your code at face value its interesting that you have token defined and used it in the web exception but use Token with a capital "T" in the regular exception catch. Thats using an undefined variable in general exception, but if you hand typed it, might just be a typo. Thought maybe the 2 different stack traces (usually the top error) may say something different that could lead you to what might be missing or different. Not having the error leaves me with nothing to go on or speculate.
j snooze
30-Jan-18 17:14pm
View
with only one line of javascript I'm not sure I totally get what you're doing, but why wouldn't you just have a css class where the opacity is 1, and change the table cell class from prgTickMark to the new opacity class?
j snooze
30-Jan-18 17:08pm
View
Can you post the stack trace?
j snooze
26-Jan-18 17:33pm
View
google adding dynamic controls to webforms. It sounds more like that is what you are trying to do versus creating a whole new form. If you want a whole different page then pass the users selection to a different page and create dynamic controls on that form.
j snooze
26-Jan-18 17:16pm
View
there is not enough info here. clearly some code somewhere that has been unprovided is trying to put a date you sent into an integer field somewhere.
We don't know the layout of the cancelled_meeting table or the meeting table. According to your SQL all you need is a meeting id as parameter {1}, yet your Dbutl.Exec you send every value ? This code makes no sense at all in its current state.
j snooze
25-Jan-18 17:34pm
View
thats because its name is txtRate1 not txtrating1. Name has to match the xhtml file control name. See how txtRate2.Text is stated? Do that except with txtRate1.Text.
j snooze
22-Jan-18 17:08pm
View
Did you try setting a breakpoint and debugging the code at all? might shed some light on the issue for you.
j snooze
17-Jan-18 17:32pm
View
If you are not familiar with the previous answers, here is how to check an appsetting on your web config file(or appsettings file on an exe).
1. In your config file somewhere inside the <configuration> section add something like this
<appsettings>
<add key="CanAddNewTranslation" value="false"/>
2. In your project add a .NET assembly reference to an assembly called System.Configuration.
3. At the top of your class add "using System.Configuration;"
4. now you can access the value of your key setting like this.
ConfigurationManager.AppSettings["CanAddNewTranslation"];
j snooze
17-Jan-18 17:16pm
View
based on how this is worded, you haven't asked a question. Perhaps you meant to post an article on how to use VBA in excel to email someone.
j snooze
15-Jan-18 17:52pm
View
This is probably data related. the error suggests that there is a range or something set somewhere and now that range is being exceeded. We have no code/data to look at, but thats where you need to start looking.
j snooze
15-Jan-18 17:33pm
View
I don't know. Most of my issues were I was just learning about cors from an angular2/.net core perspective. I had my angular2 passing the the credentials, but ended up having to allow anonymous authentication for the preflight to make it through. This was only an intranet application and I used windows authentication for the actual call, but still had to enable anonymous for the preflight. Probably not your situation, but that was my dilemma.
j snooze
12-Jan-18 18:01pm
View
I do feel your pain though, I fought the preflight for hours. Fun times.
j snooze
12-Jan-18 18:00pm
View
don't know if this will help you but I using .net core, I have this. in my startup.cs
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddCors();
services.AddMvc();
services.Configure<iisoptions>(options => { options.ForwardWindowsAuthentication = true; });
var appSettings = Configuration.GetSection("AppSettings");
services.Configure<wtsprinters.models.appsettings>(appSettings);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// Shows UseCors with named policy.
app.UseCors(builder => builder.WithOrigins("*")
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "api/{controller}/{action}/{id?}");
});
}
}
j snooze
5-Jan-18 17:07pm
View
either set a form value and post the form to the next page or pass the value as a querystring. your choice.
j snooze
2-Jan-18 17:36pm
View
if you put a break point on the execute statement and paste the "UPDATE W1..." in the immediate window what does it look like? perhaps that will help you see a missing quote or if the [Prg Name] field has a quote in the name, that will also cause issues.
j snooze
20-Dec-17 17:25pm
View
Um "Do my project for me so I can pass a class" is not what this forum is for. Its for people having issues that have done research already on google, bing, yahoo etc.. and still can't seem to resolve an issue. They would then post the relevant code, what they tried, the error they are getting and what they are trying to achieve. "Do my work for me" is none of those characteristics.
j snooze
20-Dec-17 17:22pm
View
We have no idea what you are trying to do. You simply dropped a bunch of code and said "I don't know what this is, you tell me"...perhaps you should ask your teacher if you don't understand, we have no syllabus, or specs on what you are learning or trying to accomplish through this code.
j snooze
20-Dec-17 17:18pm
View
is this a winform or a webform?
j snooze
20-Dec-17 17:15pm
View
have you tried setting the css of the text box to "text-align: center"
j snooze
7-Dec-17 17:14pm
View
connectionstrings.com is a good resource for getting your database connection strings correct.
j snooze
7-Dec-17 17:13pm
View
what error message are you getting when you try to connect?
j snooze
1-Dec-17 17:27pm
View
if you put the breakpoint on the page_load, does it get there? you are running in debug mode and not release mode right?
j snooze
30-Nov-17 9:15am
View
if you are dealing with thousands of rows of data where you start to see performance degrade on the browser side then maybe a web app isn't the best solution. I know you can do paging but most users I work with prefer scrolling to paging back and forth so too many records really starts to have noticeable impact. I prefer web apps myself because you don't have to fight through the old issues of peoples pc's not being setup the same so it works on so and so's machine but not on someone elses because they are missing framework 4.5 or missing a dll someone else has. That's the benefit of web apps although you do have to mess with browser compatibility.
j snooze
28-Nov-17 17:25pm
View
I guess it depends on how much data you plan on transferring and displaying between server and client. What might not be a bad idea is to combine some techs. You have some c# knowledge. Maybe make some c# API's that returns the data json style. Having recently attended the VSLive conference in orlando, it seems right now the big guns are using the tried and true C#, java etc on the backend webserver(some nodejs), then pick your fancy for the browser client or front end which seems to change every 10 minutes or so. If you go MVC, angular or whatever through the front end, if it ever changes you can keep the data handling web api, and stay nimble with the front end when angular loses its shine to react or the latest buzz front end framework. Thats my 1 cent. If you go javascript framework you don't lock yourself into proprietary microsoft tech vs WPF. If the data is too much for browser based app, windows does hav e the Universal windows platform as well. I've never used it, but it could be an option as well.
j snooze
27-Nov-17 17:27pm
View
why not set a hidden field value in the javascript that the server side code can read? or am I not understanding what you want to do?
j snooze
24-Nov-17 17:24pm
View
One thing worth checking if you are hitting the database many times over is...are you closing the connections in the webapi that hits the database? There is a limit. I thought I was closing mine through disposing of the reader in a .NET core api. Turns out that may close the reader but not the connection behind it. My web api would shut down. (Process explorer showed me all the connections I had between my dotnet.exe and the sql server). One of many things it could be, but worth checking since we don't have much to go on other than "I have something I coded that stops working after awhile".
j snooze
22-Nov-17 17:07pm
View
If you have put forth no effort, I wouldn't expect help. If you want us to give you a link that means we would google it which I'm confident you are capable of(or you can use bing if you prefer, and maybe even yahoo).
j snooze
21-Nov-17 17:49pm
View
I don't know if I have enough info to tell why that would be. I would step through the debugger and put a break point on your graph_selectedIndex change to verify its getting there when you select a new graph type and then see if there are any errors getting the data for the new graph selected.
j snooze
21-Nov-17 17:39pm
View
Does this link help? I've only struggled through the wonders of CORS using .NET myself so I have felt the pain.
https://stackoverflow.com/questions/34872760/how-do-i-enable-cross-origin-resource-sharing-on-xampp
j snooze
21-Nov-17 17:22pm
View
Dumb question on my part, but the very first line in your page_load is
graph.Items.Clear();
so every time you postback you are clearing out your drop down?? Shouldn't this go inside the "if (!Page.IsPostBack)" block? If you are clearing out the drop down every postback and refilling it, then the viewstate can't hold the value of your drop down for you.
j snooze
20-Nov-17 17:15pm
View
Don't know if I understand completely what you are asking, but if you just need to read the contents of a text file that you wrote to, this link should help.
https://msdn.microsoft.com/en-us/library/system.io.streamreader.readtoend(v=vs.110).aspx
j snooze
10-Nov-17 17:24pm
View
Not knowing if you have multiple title nodes or not, why not just do a xpath query of selectnodes("//b:title") and throw the childnodes in their own nodes. then you can just loop through and write those out or whatever you are trying to do.
j snooze
2-Nov-17 17:34pm
View
Well if I had to guess, I'd say you don't have a your-modal or your-modal2 defined anywhere. You need a div with an id of "your-modal" and "your-modal2" that you want your dialog box to look like. You also need to define it in the javascript ready function (which you have) $("#your-modal").dialog();...I don't see any of that in your javascript. I think the best thing you can do is visit https://jqueryui.com/dialog/...maybe this is not what you are trying to achieve? I guess I don't see a script reference to the jquery ui widgets anywhere either.
j snooze
2-Nov-17 17:18pm
View
to expand on jekin77's replly since sql server isn't as nice as oracle or mysql in this particular instance, this link should give you an idea on syntax.
https://stackoverflow.com/questions/15477743/listagg-in-sqlserver
j snooze
1-Nov-17 17:13pm
View
I should note that once I went to MVC, I didn't want to go back to webforms.
j snooze
1-Nov-17 17:12pm
View
I don't see why not. I went from using webforms to MVC (dabbled a little in angular as well). With so many jquery widgets out there you can probably replicate all that functionality. I've used the https://datatables.net/ jquery plugin effectively for sorting and searching through the datagrid. there are some context menu items as well. Just mix and match and you'll learn alot. Since most development is web these days the skills will be welcome on your resume :)
j snooze
27-Oct-17 17:19pm
View
you need to update your question. First all you did was post a bunch of code and from that we were supposed to figure out that you needed cascading drop downs? Remember we know nothing about what you are trying to accomplish. You never actually posted a question at all. If you want help, help us understand what you are trying to do. Now you say if you select a movie its not working fine. What does that mean? You are not getting the proper values in your other drop downs? Its erroring? What result are you trying to get? BE SPECIFIC, the more info we have the more we can help...but you have to make an effort, then we will be more than happy to point you in the right direction.
j snooze
27-Oct-17 17:10pm
View
Can't you just drag and drop a textbox onto your form and set its .text property to whatever the text is that you want?
j snooze
26-Oct-17 17:42pm
View
If there are no errors, can you verify in the database after clicking add that the value is indeed added to where its supposed to be? Its not pulling from cached data or anything is it? (looks to be a winform so I'm assuming not, but I cant' see what sus.Getallcrimebehavior does)..also did you remember to aim your installed app at the correct sql server? perhaps its still aimed at your test box?
j snooze
19-Oct-17 17:40pm
View
is there more than 1 dimension= in the text file and you have to find all of them? otherwise you should be able to get the starting position of the "dimension=" and then get the next 2 double quote positions starting from the dimension= using indexof and substr methods.
j snooze
17-Oct-17 17:20pm
View
Agree with Richard here, what is wrong with SFTP encryption? Technically there is nothing wrong with encrypting and uploading, but to decrypt it from your side you would have to bring the bytes back down to you. You could give the client a decryption app so they can decrypt, but otherwise, your encryption would be useless because you'd have to download the bytes to unecrypt and reupload the unencrypted bytes which renders the initial encryption useless.
j snooze
16-Oct-17 17:36pm
View
Have you verified the code works with a small set of data?
j snooze
16-Oct-17 17:32pm
View
You look like you're working too hard on this. May I recommend downloading the css3 bootstrap. They have all kinds of stuff for creating navbars with menus, and responsive design classes already included. Plenty of code samples for you to look at and use.
https://getbootstrap.com/docs/3.3/css/ this way you don't have to recreate the wheel, but concentrate more on your color schema, look and feel.
j snooze
12-Oct-17 17:37pm
View
Maybe this will help.
https://stackoverflow.com/questions/13410464/pivot-on-oracle-10g
j snooze
22-Sep-17 17:27pm
View
maybe try this?
window.onscroll = function(ev) {
if ((window.innerHeight + window.pageYOffset) >= document.body.offsetHeight) {
alert("you're at the bottom of the page");
}
};
not sure if it will work with all browsers, but play around and see if something similar helps.
j snooze
20-Sep-17 17:27pm
View
I recommend googling that very error and trying some of the results that show up from your search.
j snooze
20-Sep-17 17:21pm
View
I can see passing parameters through javascript, but passing an entire query? That seems like a security issue waiting to happen. You sure you want to do that?
j snooze
20-Sep-17 17:18pm
View
How long does the SP take to run? what happens if you run it using SQL Server Mgmt studio or oracle developer or whatever database you are using? Does it error?
Show More