Click here to Skip to main content
14,926,216 members

Comments by F-ES Sitecore (Top 200 by date)

F-ES Sitecore 31-May-21 12:34pm View
You should learn to use the debugger and step through your code a line at a time to get a better idea about what is happening.
F-ES Sitecore 14-Apr-21 11:05am View
Do you want to give them new IDs when you clone them in the DB? If so I'd try just detatching them, setting the ID to 0 then try to Add to the relevant table\dbset. If you want to duplicate the address objects you'd probably need to do the same.
F-ES Sitecore 14-Apr-21 6:39am View
What is the main reason you are trying to close these objects? Once you've made clones of them you won't be able to call Save or whatever as they are no longer attached to a database context so you would need to attach them first. If you're just looking to modify the data and re-save it then you can get the entities as "no tracking" or non-attached entities, make the changes you want, re-attach them then save the context. I'm sure there is a better solution to your actual problem than cloning the objects.
F-ES Sitecore 14-Apr-21 6:08am View
Is testObj.PrimaryAddress null in the line that throws the exception?
F-ES Sitecore 13-Apr-21 22:02pm View
Actually now I think about it as these are EF entities the problem might be that you're using proxy objects in EF. Try disabling proxy generation

and if the clone works after that then that's your problem. Either leave proxies off or if you want to close the proxied object you won't be able to use memberwiseclone at all, you'll literally need to copy the properties across from the original to a new object you crated. If you're using something like AutoMapper then it can do that for you, or you can use reflection

Reflection example

or just manually copy properties but that's pretty tedious. You can just re-get the items from the database, that's another option.
F-ES Sitecore 2-Mar-21 20:36pm View
You need to find out exactly what the error is, if you look at the ajax call in the network section of the browser tools you can probably get more info. Your url is going to "/Delete/123", are you sure that resolves to an action?
F-ES Sitecore 26-Feb-21 8:06am View
From your code it looks like "message" can only be two things. Whatever generates that message will need the ability to specify that the data couldn't be removed, and your js will need to react to that and show a different message.
F-ES Sitecore 18-Feb-21 9:46am View
What are the 500 errors you're getting? A missing icon or image won't create 500 errors.
F-ES Sitecore 18-Feb-21 9:44am View
Or "value" if they want the text in the box to be changed.
F-ES Sitecore 12-Feb-21 4:54am View
You can run your own git server in-house, you don't need to use external repositories.
F-ES Sitecore 29-Jan-21 3:15am View
What's the error you get?
F-ES Sitecore 22-Jan-21 8:16am View
The debug setting so should have no effect on your running site, especially not styles etc. It's more likely you're not referencing static resources correctly so their src urls are wrong, causing them not to load.
F-ES Sitecore 17-Jan-21 9:48am View
Do you mean that FileModel has other field in it like ID? If so you can access those properties as normal, so file.ID, and save them wherever you want. If you want to construct a url to the file you've just created you'll probably have to do that yourself by building it from the items like Request.Uri.Authority which will give you the domain then just add the wwroot and filename yourself.
F-ES Sitecore 17-Jan-21 9:43am View
You can't call server-methods from javascript, the only calls you can make to your server code are ajax calls to web service type methods. You'll need to either come up with a way of doing what that bound event does in pure jQuery, or implement a web method your jQuery can call that returns data you then manipulate. The best solution really just depends on exactly you want to happen.
F-ES Sitecore 6-Jan-21 13:21pm View
It will be something defined elsewhere on the form, maybe a control called FileBrowser.
F-ES Sitecore 6-Jan-21 13:03pm View
They're all selected because....they're all selected? :) You have selected="selected" in all of your options in the html.
F-ES Sitecore 6-Jan-21 12:06pm View
So do a COUNT or SELECT on the table to see if their data is in it and if so set the colour using css.
F-ES Sitecore 6-Jan-21 11:41am View
What are the rules that dictate when the colour has to change?
F-ES Sitecore 23-Dec-20 10:33am View
Use the System.IO classes like File etc to create and write to files. Google the documentation for examples.
F-ES Sitecore 18-Dec-20 4:42am View
If you want that data to exist on another page you'll need to get it from your data store and pass it to that page also. How you do that depends on how things are implemented. If you want to remember the item the user had selected then you'll need to do that yourself too, you can use the Session to store that kind of information and retrieve it on another page to know what to automatically select.
F-ES Sitecore 4-Dec-20 6:27am View
You'll probably have to do an ajax call to your mvc action (or implement an ApiController if you want) that passes the name of the director and returns a list of relevant results. Your js would then go through those results and update the html on the page accordingly. It's quite a broad topic, if you search for things like "c# mvc ajax search" you'll probably find sample code.
F-ES Sitecore 3-Dec-20 6:27am View
You need to get the "return" value from your SP so you know what happened inside it. You return -3 when the id exists but your code doesn't retrieve that information. You need to add the return parameter to your command so you can process that information.
F-ES Sitecore 1-Dec-20 7:34am View
"not working" doesn't give anyone enough information to know what the issue is. What doesn't happen that you expect to happen, or what does happen that you didn't?
F-ES Sitecore 27-Nov-20 4:30am View
Use a "SelectList" to pass to your DropDownList rather than just an IEnumerable of SelectListItem. The SelectList object contains properties that say which property to use for the Text and the Value of your items. Google "Html.DropDownList SelectList" for code examples.
F-ES Sitecore 21-Nov-20 14:44pm View
c# code runs on the server when the page is being rendered and the results of that rendering are sent to the browser to be processed, at which point your js now runs. So you can't run c# in the browser. The solution depends on what the code does, it might need an ajax call to the server to do some work, or if it needs server-side data you could maybe create js variables with that data in them.
F-ES Sitecore 18-Nov-20 6:06am View
That will only work if the site uses basic authentication which is fairly unlikely.
F-ES Sitecore 17-Nov-20 7:01am View
Would you want websites reading your clipboard?
F-ES Sitecore 15-Nov-20 6:40am View

image.src = "/media/photos/" + value.imagePath + "";
F-ES Sitecore 11-Nov-20 6:40am View
You should use events for this. The child form should have some kind of "StartTimer" event that the parent form subscribes to. The child form will raise this event when required and the parent form will then start the timer when the event is raised. Google for how to use events for specific implementation details.
F-ES Sitecore 6-Nov-20 9:11am View
No-one here is going to do your homework for you.
F-ES Sitecore 5-Nov-20 14:20pm View
Then build your own rather than stealing other people's effort :)
F-ES Sitecore 5-Nov-20 13:27pm View
Use the translation API instead
F-ES Sitecore 3-Nov-20 11:52am View
You'll need to post the relevant bits of the code.
F-ES Sitecore 3-Nov-20 11:01am View
You can't. Apps are protected from each other so one app can't modify another.
F-ES Sitecore 2-Nov-20 8:19am View
You can't do that, you can only pass text as json parameters, not objects in memory. To send an object you need to serialise it to text, send it via ajax, then deserialise it in your api. The httpcontext doesn't let you do this by default. Create a serialisable object that contains just the bits of info from httpcontext that you need and send that as your parameters.
F-ES Sitecore 2-Nov-20 8:05am View
What's the method signature of the api you're calling? Your passing an array of data rather than a single item so it might be that, without knowing how the method is defined it's impossible to say what the problem might be.
F-ES Sitecore 1-Nov-20 11:21am View
It doesn't really matter TBH, it's not that complex of a site so three tier will work just fine.
F-ES Sitecore 1-Nov-20 10:26am View
There's nothing particularly wrong with the code so check the has the data you expect.
F-ES Sitecore 28-Oct-20 13:07pm View
Without knowing what data your sp returns it is impossible to say. Is it literally two tables? like

select * from parent
select * from child

or are the two tables joined into a single result set? Regardless the question is too broad and it just reads like you want us to do your work for you. Google how to convert data from a stored procedure into json, or you might have to read the results into your own class objects and just convert that to json.
F-ES Sitecore 28-Oct-20 7:34am View
You can't publish applications to subfolders, they will only work in folders designated as a site root. To get it working in a sub-folder you have to make the folder a virtual directory in IIS. If your site is hosted somewhere that might not be possible depending on what your host allows, you'll need to check their documentation.
F-ES Sitecore 27-Oct-20 6:58am View
Your code is running on the server so it is returning information about the server. You can only get info from the client that they send in headers or that is available to determine via javascript. It's unlikely you'll be able to get the data you are wanting for security reasons.
F-ES Sitecore 24-Oct-20 8:58am View
I don't see an updatepanel in the updated code?
F-ES Sitecore 24-Oct-20 8:56am View
The main problem with how you're doing it is that you're trying to cast X<A> to X<B> and you'll struggle to do that easily.
F-ES Sitecore 23-Oct-20 8:14am View
You can't really cast generic classes to other generic classes, you might need to think about how you're going to use this. Bearing in mind your calling code isn't going to know which concrete LogicBase class you're using it can only work on the LogicBase level so your factory logic could work like this instead

public static class LogicBaseFactory{    public static LogicBase Create(string whichOne)    {        return new LogicSubclassB();    }}

rather than getting the graphics base object just return the logic object instead. Or you could create a new generate graphicsbase object

public class GraphicsSubclass : GraphicsBase<LogicBase>{    public GraphicsSubclass(LogicBase logicObject) : base(logicObject) { }}

then the factory would be

public static class GraphicsFactory{    public static GraphicsSubclass Create(string whichOne)    {        return new GraphicsSubclass(new LogicSubclassB());    }}

Your calling could would be

GraphicsSubclass g = GraphicsFactory.Create("b");

and while the strongly typed property returns LogicBase, the object is actually LogicSubclassB so you can upcast to that in your calling code if needed, and any virtual method should work too.
F-ES Sitecore 22-Oct-20 11:21am View
Check the event log or any error logs.
F-ES Sitecore 22-Oct-20 4:41am View
You'll have to do this with client-side javascript. Google for "window.setTimeout" to see how to set client-side timers. You'll have to show the message using javascript too.
F-ES Sitecore 21-Oct-20 10:25am View
So on your first day of a course you only get an assignment with no instruction or education about how to complete it? You're left on your own? That's like attending flight school and on the first day being put in a cockpit and told to fly to the next country. If you're not getting any actual education on your course I'd do another course as you're not actually being taught anything.
F-ES Sitecore 20-Oct-20 14:40pm View
GetKeyDown will only return true once per frame so I don't see how it will do it multiple times unless you have some crazy fps issues. Try changing the line to

if (!JumpKeyWasPressed && Input.GetKeyDown(KeyCode.Space))

and see if that makes a difference.
F-ES Sitecore 20-Oct-20 14:37pm View
I doubt this will be possible. Other things are looking for the LSERVRC variable and using it to access that file. You have no way of telling those things that they have to extract a resource from your dll instead.
F-ES Sitecore 19-Oct-20 10:59am View
If you don't list the ways you have tried someone might suggest something you've already tried.
F-ES Sitecore 19-Oct-20 6:31am View
If you use parameterised queries to execute your sql and use the ".Value" property of the date picker then ado should do all the work for you. You might have to post the relevant bits of your code when you execute the insert for specific help.
F-ES Sitecore 19-Oct-20 6:12am View
The solution is roughly the same solution I gave to your other question.
F-ES Sitecore 17-Oct-20 11:20am View
Use the network section of the browser tools (f12) to see if the requests for the images are working or not. If they are responding with a 404 then you're not requesting from the right path.
F-ES Sitecore 14-Oct-20 11:16am View
google " show blob image gridview" and you'll find various ways to do this.
F-ES Sitecore 14-Oct-20 10:56am View
What do you mean by "mapping"? What are you mapping the xml to?
F-ES Sitecore 14-Oct-20 8:22am View
Use HttpUtility.ParseQueryString to parse the individual values into a collection of name\value pairs (google how to use it if it's not obvious). Once you have that collection just construct your desired output from it. Note that no-one here is going to do all of the work for you.
F-ES Sitecore 12-Oct-20 12:07pm View
Are you serving the files from a webbrowser (does the address bar look like http://someserver/yourpage) and not just loading them into the browser as files from disk (the url will be like file://c:\somefolder\yourpage)?
F-ES Sitecore 12-Oct-20 12:02pm View
What do you mean by "c# browser"? What type is webBrowser1?
F-ES Sitecore 11-Oct-20 12:04pm View
When viewing a page you shouldn't be able to view press ctrl+f5 to do a hard refresh. If the page is no longer visible then the issue is that the browser is showing you a cached version of the page from when you were logged in.
F-ES Sitecore 10-Oct-20 12:53pm View
I would implement an api that lets you search for data rather than searching through the html. The api would search the raw data and would probably be pretty quick. You could use the results of the api to manipulate the table you have, or you could simply create a new table from the results.
F-ES Sitecore 9-Oct-20 11:05am View
We can't really help without have access to your data but if you google that error message it will show you the scenarios that it occurs.
F-ES Sitecore 5-Oct-20 9:27am View
I don't understand the question, but if you want 'AHE' in the USERMODIF field then just do

INSERT INTO [AffecAnalytique].[dbo].[C9_V]([C9],[V],[OID],[USERMODIF]) SELECT [C9],[V],[OID], 'AHE' FROM [AffecAnalytique].[dbo].[C9_V] WHERE [OID]='CEC4F038E3954AC79DBF7EC38B02171F'
F-ES Sitecore 5-Oct-20 7:03am View
If it's literally just a sub-folder then your site probably won't run at all, it will need to be inside a virtual directory. You can use @Url.Content in your views to reference static files, but as I said none of these techniques will work if your site is simply in a normal sub-folder.
F-ES Sitecore 3-Oct-20 6:44am View
All it does is check if a file exists and checks the size of the file is greater than 0, and if either of those things aren't true to throw errors. Just google " check file exists" and " check file size" for equivalents.
F-ES Sitecore 2-Oct-20 10:39am View
What's wrong with the code you are using now?
F-ES Sitecore 2-Oct-20 9:06am View
What line throws the error?
F-ES Sitecore 30-Sep-20 12:31pm View
serialiseArray() returns your form as JSON but not in a format you can pass to an MVC action. It comes out like

{name:FormElement1Name, value:FormElement1Value},
{name:FormElement2Name, value:FormElement2Value},

but to send to your MVC action it has to be in this format

FormElement1Name: FormElement1Value,
FormElement2Name: FormElement2Value

so getFormData creates an object of the right format by going through each name\value object and adding a property to the output object where the property name if the "name" value and the property value is the "value" value, essentially mapping one format to the other.
F-ES Sitecore 30-Sep-20 8:45am View
What you're trying to do is a bad idea. If this is a public search function your code can perform incredibly badly if someone puts in a long phrase, so bad it can tie up a thread until it times out and you have a possible DOS attack vector. If this is an index search just throw all the words as optional requirements and let the index do the work for you.
F-ES Sitecore 28-Sep-20 12:45pm View
You'd have to write your own extension method as the one you're using doesn't support that.
F-ES Sitecore 27-Sep-20 14:20pm View
If you have code that says how many of times the word appears in the file if the count is one or more then that's a result, so loop that code for all your files and count up how many returned a result of > 0
F-ES Sitecore 24-Sep-20 5:41am View
What sql type is the param for SP_AdressSettings?
F-ES Sitecore 24-Sep-20 5:39am View
You can be sure eBay doesn't run off one server :) I would say have 1,000 servers and divide the searches across all your servers.
F-ES Sitecore 23-Sep-20 11:16am View
Contact whoever runs the website.
F-ES Sitecore 23-Sep-20 6:00am View
What is the internal error?
F-ES Sitecore 22-Sep-20 8:42am View
If it has to be an int value as it does Convert.ToInt32. If you want to gracefully handle when people use non-ints then use int.TryParse instead. That will return "false" if the value can't be converted to an int, making it easier to show an error, or default to another value, whichever you want to do.
F-ES Sitecore 22-Sep-20 8:28am View
There is no "Search" element there, did you mean SearchLv?

var SearchValue = $("#SearchLv").val();
F-ES Sitecore 22-Sep-20 6:06am View
$("#Search") won't be finding an element that has a "value" property. You haven't posted the relevant bit of the view that outputs the "Search" element so it's hard to say why that is, but that's what you need to look at next.
F-ES Sitecore 22-Sep-20 5:00am View
Put a breakpoint inside the GetSearchingData method, what is the value of SearchBy and SearchValue?
F-ES Sitecore 22-Sep-20 4:56am View
Is the url right? Is the json correct? Does your API method get called? Are there any exceptions raised?
F-ES Sitecore 21-Sep-20 11:59am View
Yes, that's all that's there. Cookies of one site can't be read by another.
F-ES Sitecore 21-Sep-20 10:30am View
Use the dev tools on your browser to see what's in the cookie, or go to the folder when your browser stores cookies and look for it there.
F-ES Sitecore 21-Sep-20 7:46am View
If that was possible don't you think viruses and malware would do it?
F-ES Sitecore 17-Sep-20 10:01am View
You're getting the outer brackets as the object you are serialising to return is a collection (ControllerObject). To get rid of the brackets return a single object, like ControllerObject[0] or ClassObj as I suggested above.
F-ES Sitecore 17-Sep-20 7:59am View
Google how to pass a list or array to a controller, you can't use "foreach(var x in Model)" in the view, you have to use a "for" loop and array indexing, but the samples you find will show you what you need to do.
F-ES Sitecore 17-Sep-20 6:34am View
There are two loops, the inner loop will loop 3 times, however the outer loop will loop the inner loop 3 times, so that is 9 loops in total.
F-ES Sitecore 16-Sep-20 6:05am View
I can't see where your "icon" elements are being created, but learn to use the debugger tools in your browser to step through the javascript to get an idea what is going on and at what point the code stops doing what you expect.
F-ES Sitecore 15-Sep-20 12:59pm View
No, but five seconds of googling found this
F-ES Sitecore 15-Sep-20 12:46pm View
Repost of

My guess is that it's using a picturebox to show the image that's slowing it down. Google for faster ways to draw in c#, you can try painting to a form rather than a picture box, or try OpenCV, DirectX etc.
F-ES Sitecore 15-Sep-20 11:19am View
You can't handle file downloads via ajax as your js is handling the response and it can't write that response to a file. Rather than using ajax just use a normal form that points to your action and have the file as a normal form element. That will cause the browser to run the action and handle the response, which will kick off the download manager.
F-ES Sitecore 15-Sep-20 10:00am View
You're not referencing the txtQuantity control in your updatestock function. Google how to use FindControl with GridView to get a reference to the control.
F-ES Sitecore 15-Sep-20 7:31am View
It's probably just complaining as you're using a resource that has come from the client without any kind of encoding. The issue is how you show the data in your gridview, you have to make sure that isn't susceptible to xss attacks, but if you have viewstate MAC encryption on I wouldn't worry, I'd just disable the warning for that section of code.
F-ES Sitecore 15-Sep-20 5:31am View
ids aren't submitted as part of the form. One way of doing this is to make sure the checkboxes all have the same "name" and the "value" of the checkbox will be the id of the record it represents. When you submit the form the value of the checkbox field will be all the ids comma separated, so "1,2,3,4". Store these values in the Session so you can recall them on your update page. If you can't get model binding to convert the comma list to an array of ids automatically you can do it yourself with the string.Split function. For each id execute an update statement, or you can keep the ids comma separated and use the "IN" SQL clause to batch update them;

update [table] set [surname] = 'name' where ID in (1,2,3,4)
F-ES Sitecore 13-Sep-20 8:19am View
Change "panel1" to whatever the name of your panel is.
F-ES Sitecore 12-Sep-20 10:11am View
Your view expects a single item but you are passing it a list of items. We can't tell you how to fix this, you need to decide if your view needs to change to accommodate a list of items, or if your controller has to change to pass only a single item.
F-ES Sitecore 10-Sep-20 6:41am View
Automating Excel from isn't supported so I wouldn't spend too much time trying to resolve this. Instead use a library that is supported in
F-ES Sitecore 9-Sep-20 9:00am View
It's a bad approach because it won't work :) It will also give the user no indication that they can click the element to navigate. If you use an "a" tag the browser will show the appropriate cursor and the destination will be shown in the status bar as per user's expectations.
F-ES Sitecore 9-Sep-20 7:19am View
If you want something to go to a page when you click it then put an <a> tag around it.
F-ES Sitecore 9-Sep-20 6:34am View
It's expecting something that is a DataContext object as the first param, so whatever TAGEntities is, it's not a DataContext.
F-ES Sitecore 8-Sep-20 12:57pm View
"Not working" doesn't give anyone enough information to understand your problem or help you, and we can't see your css to replicate the issue so it's unlikely we'll be able to help.
F-ES Sitecore 8-Sep-20 12:50pm View
You have to specify the types for the arguments and the result you expect in angled brackets after the Compile method.

CompiledQuery.Compile<ArgType1, ArgType2, ResultType>(...)

Not knowing any of the types you're using it's hard to give a precise answer.
F-ES Sitecore 8-Sep-20 7:43am View
You are using a variable that is "null". From your screenshots it looks like Model is null and if it is null you can't loop through it. So you need to look at the controller which will have a line like

return View(model)

In that code "model" will be null, so you have to work out why it is null if you expect it to have a value.
F-ES Sitecore 8-Sep-20 6:40am View
What line throws the error? You need to find out what is null that you don't expect and we can't do that for you. The error is more likely to be in the controller.
F-ES Sitecore 7-Sep-20 5:58am View
You didn't really supply any new information there, or answer the question about if the handler is called. Use the debugger to check, or the network section of the browser's dev tools so inspect the call to the handler to ensure it happens and if it does what the result was.
F-ES Sitecore 7-Sep-20 5:56am View
This code won't compile so I don't understand how you can have had it working. It looks like code you've copied from somewhere else without actually understanding. The issue might be

camera = new Capture(1);

that will get a reference to the second camera device attached. If you're trying this code on a different machine with different number\configuration of cameras then "1" might not longer refer to the camera you want, it might be "0" or some other number.
F-ES Sitecore 7-Sep-20 5:41am View
Let's start at the beginning....does the ProcessRequest method of your handler get called? If not and it's 404ing it might be as simple as a path issue if your content page is not in the root folder. When using ResolveUrl you should supply a path relative to the site root with "~" meaning root

ResolveUrl("~/ProductHandler.ashx" )
F-ES Sitecore 7-Sep-20 5:38am View
Remove the "catch" block, it's just hiding any exceptions that are being thrown. Use the debugger to check the json generated is what you expect, and if it is check how you use that json in the client browser.
F-ES Sitecore 7-Sep-20 5:34am View
If your query is returning 9 then that is the biggest instance of ReceiptNo in the database so your problem lies elsewhere. If you think it should be more then check where\how you create new rows, but as already told in the solutions trying to do your own auto number is generally very bad practice.
F-ES Sitecore 4-Sep-20 11:59am View
That's clearer, you add a manifest file to the vb exe which the underlying COM system natively knows how to process. Not sure that would work when developing a VB6 app though, it looks like something that helps you deploy the app after it has been developed such that you don't need to register your COM components.
F-ES Sitecore 4-Sep-20 11:55am View
Not sure that's going to work. The absolute url works as you are making an http call to a different host which is running that blazor site in that host server which supports blazor, and returns html. Using a relative path means accessing a page that is running in the same host as the parent site (webforms) which doesn't support your blazor page. You're effectively trying to run webforms and blazor in the same site which I'm not sure is supported. If it is you haven't configured it properly.
F-ES Sitecore 4-Sep-20 11:49am View
Is that not for when .net is the consumer of the COM object though?
F-ES Sitecore 4-Sep-20 9:57am View
GC will never clean it up as it has an active reference. Until the Action object no longer exists anyway.
F-ES Sitecore 3-Sep-20 12:23pm View
Bit of a long shot but all the code samples I've seen have spacing before param name so maybe try that first

select c.fullname, from client c where = :id
F-ES Sitecore 3-Sep-20 9:10am View
If you don't want to use stripe you can use paypal, there is probably better development support and examples for that. Although I googled "stripe mvc" and found lots of getting started examples and tutorials. If you can't follow the documentation or other people's tutorials I'm not sure what kind of help you are expecting from us.
F-ES Sitecore 3-Sep-20 9:05am View
Any database can be accessed "off line", databases are rarely accessed via the internet. If you're running a website it will access the database locally, if you're using a desktop app you'll need to ensure the machine it runs on also has access to that database some way that doesn't involve the internet, such as if it is on the same network.
F-ES Sitecore 3-Sep-20 7:10am View
You keep saying it throws an exception, that information isn't enough for anyone to help you. You have to say which line threw the exception. The above snippet worked ok for me.
F-ES Sitecore 3-Sep-20 7:02am View
For your uses you'll probably want something like SQLLite as it's lighter-weight, re-distributable etc. When you go to "proper" databases like SQL Server you need to install them and so on, they're just trickier to get going.
F-ES Sitecore 2-Sep-20 14:31pm View
It's ".ready" not ".read". Regardless I don't think you'll be able to do this as security stops you amending frames from other "origins" or domains. As the iframe contains a document served from your code (that isn't served from won't be able to amend it.
F-ES Sitecore 2-Sep-20 10:48am View
Yeah it puts a bunch of files in the directory you specify (not sure I mentioned but "temp\index" is a directory, not a file) so it's persistent and when you run queries it runs them against the index in that folder, it's not loading all the data into memory, these indexes can have many millions of rows.
F-ES Sitecore 2-Sep-20 7:58am View
What is the error and what line does it occur on?
F-ES Sitecore 1-Sep-20 14:14pm View
If they want you to have their data they will provide an API or some kind of data feed. If they don't have that option then they don't want you to have their data.
F-ES Sitecore 1-Sep-20 6:32am View
You do it the same way you update "uploadStatus", use .html or .text to update the contents of the appropriate element in your modal.
F-ES Sitecore 31-Aug-20 12:58pm View
The best way is by writing some code :) Google " read csv file" and " write to access database", they're both well-documented things.
F-ES Sitecore 31-Aug-20 9:47am View
The problem is likely to be with the view such that it isn't passing a RegCoursesViewModel.Courses object to the action.
F-ES Sitecore 27-Aug-20 13:32pm View
If you're looking for someone to write code for you try a freelancer website.
F-ES Sitecore 27-Aug-20 11:50am View
If you make the id static then all rows will give the dropdown the same id making the html invalid and the dropdowns inaccessible by id. This code

<asp:GridView ID="gvchaptername" AutoGenerateColumns="false" GridLines="None" OnRowDataBound="gvchaptername_RowDataBound" runat="server" >
        <asp:TemplateField  HeaderText="">
            <asp:DropDownList ID="DropDownList1" class="form-control" ClientIDMode="Static" runat="server"></asp:DropDownList>

<script type="text/javascript">
    $("#DropDownList1").css("border-color", "red");

results in this;
F-ES Sitecore 27-Aug-20 11:09am View
Please don't repost questions, people will add solutions to your question over time.
F-ES Sitecore 27-Aug-20 11:01am View
The html is still invalid, ids have to be unique. There is no point in using the id attribute if it isn't unique.
F-ES Sitecore 27-Aug-20 10:51am View
What if the grid view has more than one row?
F-ES Sitecore 27-Aug-20 10:38am View
If that is genuinely your code then there is no vulnerability there so you should use the appropriate attributes to have your code checker ignore that error for that bit of code. If that isn't actually the exact code, or the vulnerability is actually elsewhere (like "/" on, then we can't help you fix vulnerabilities in code you haven't shown us so you will need to update your question to show the actual code.
F-ES Sitecore 27-Aug-20 8:07am View
The fact that you don't think it is relevant to tell us what the database is makes me think the task is probably beyond you. Also VB6 has been dead for a long time, you'll struggle to find anyone who can help you or any resources making this task even harder still. If I was you I'd google for "COM PDF viewer" to see if you can find a COM-based PDF viewer that someone else has written and just use that in your project.
F-ES Sitecore 27-Aug-20 7:58am View
This isn't a code translating service, and if you get someone else to do your homework then you haven't learned anything.
F-ES Sitecore 27-Aug-20 6:39am View
So save the results of the query into a file. Google "c# save text as file" for examples.
F-ES Sitecore 26-Aug-20 8:24am View
google "sql recursive join" for ideas.
F-ES Sitecore 25-Aug-20 10:59am View
start by googling, so google "python read csv file" and you'll get lots of results and go from there.
F-ES Sitecore 24-Aug-20 11:06am View
Nothing is changing i and the while statement has a semi-colon after it meaning it just does the while bit, not the line of code after. See me after class :D
F-ES Sitecore 24-Aug-20 9:03am View
For starters google how to use "while" and compare the examples with yours. Your while loop is actually doing nothing at all, you should be able to work out why from the documentation. Also look at the "for" loop as that is better for looping a set number of times.
F-ES Sitecore 24-Aug-20 6:52am View
You're probably going to have to use a js plug-in that lets you show a web page in a modal box, or completely refactor your code so it is compatible with more traditional js modal plug-ins which will involve the contents of your modal being on the same page as the parent page.
F-ES Sitecore 22-Aug-20 7:52am View
So start writing the code :) We don't mind helping where you are stuck but we're not going to write all of the code for you.
F-ES Sitecore 21-Aug-20 12:53pm View
Have properties that expose the things you want to read, so form2 will have a bool property called "CheckBox" (or whatever) that returns true if it is checked otherwise false. Similarly you could have an "UpdateTextbox" method on form1 that sets the value of the checkbox. You then just need to call the relevant properties\methods on the various forms to do what you want to do. The kicker is that form2 will need a reference to form1 and how possible\viable that is depends on how you're creating these forms. You might need to use events to communicate button clicks to your main GUI form if form1 and form2 are both sub-forms.
F-ES Sitecore 21-Aug-20 6:32am View
The code looks a little over-complicated, but one thing I see missing is that the original sets the x-api-key request header and your code does not. You're also using basic auth where the original doesn't. Use a tool like Fiddler or wireshark to compare the two requests to see how they differ.
F-ES Sitecore 20-Aug-20 15:26pm View
There is a malformed <a> link in your code so it's hard to tell if it is just following the link when you click it as you seem to be setting the href to your action. Look at my example, the href is just a token "#" so it looks and acts like a link, the onclick then summons the modal.
F-ES Sitecore 20-Aug-20 13:51pm View
Look at the solution I've already posted, I've added the code to the bottom of it.
F-ES Sitecore 20-Aug-20 13:18pm View
I've updated my solution with a skeleton version of what you're probably trying to achieve
F-ES Sitecore 20-Aug-20 12:55pm View
It should show your modal, if that is properly configured, you don't show the mark-up for it, and you need to make sure the modal calls your "createCourses" function when it is submitted, or when the "Save" button in the modal is clicked. As createCourses uses the createCourseForm form to get its submission data from you need to make sure your "exampleModal" is inside the form you've created with BeginForm and has the relevant fields that the eNtsaRegCourses model needs.
F-ES Sitecore 20-Aug-20 12:20pm View
Yes, but having code in the onclick attribute doesn't stop the link navigation happening, so your modal shows then the browser instantly navigates away from the page, that's why you need it to return false.
F-ES Sitecore 20-Aug-20 11:49am View
Personally I went to university for five years. If you can't learn c++ from books then you just might not be academic enough to learn coding, it isn't for everyone.
F-ES Sitecore 20-Aug-20 11:47am View
You're probably just getting confused about what your code is actually doing as it is doing so many things. You have a form that does a POST, a link that does a GET and javascript that does a three ways of instigating the action, but which one is actually being done? The form will only post if you click a submit button, the ajax will only post if you call the js function, and the link will GET when you click it. If you click the link to run the ajax code the link is still clicked so it still goes on to GET. You have to stop that by making the onclick return false.
F-ES Sitecore 20-Aug-20 11:25am View
It will go to HttpGet when you issue a "GET" request which happens when you click a link, put the url in the address bar or do a code-based redirect to the action. It goes to HttpPost when you submit a form with method=POST and has the action in the "action" attribute of the form (or use ajax to do a post to the action).
F-ES Sitecore 20-Aug-20 11:11am View
You can have both on the same action, but you normally need to split them into their own actions

public ActionResult CoursesRegistration()
    // return a View with the form in it

public ActionResult CoursesRegistration( eNtsaRegCourses model)
    // process the form
F-ES Sitecore 20-Aug-20 10:59am View
Then you need both an HttpGet and HttpPost version of your action. The HttpGet will return a view with the form and the HttpPost will process the form once it is submitted.
F-ES Sitecore 20-Aug-20 9:12am View
If HttpGet is working and HttpPost is giving you a 404 that suggests your form is not doing a post to that action, somewhere along the way it is making a get instead. Look at my response to your new question so see why.
F-ES Sitecore 20-Aug-20 8:56am View
Probably because the data isn't being submitted. If you are redirecting to that action from the login page there is no data in that request so your model will always be null. You have to submit from a form with method=post direct to your action.
F-ES Sitecore 20-Aug-20 8:41am View
Reading between the lines, are you submitting the form which is requiring authentication so you are directed to the login form then back to your action? If so that is your problem as your action is HttpPost and the redirect is an HttpGet. When you redirect to your url after login it doesn't preserve the original form data so you'll need an httpget version of the action that redirects to the original form. The user will have lost their data though so ensure the person is logged in when they access the form, not after they have submitted it.
F-ES Sitecore 20-Aug-20 8:32am View
Well that config works for me, what is the url when you get a 404?
F-ES Sitecore 19-Aug-20 11:21am View
Could you clarify what is setting the cookies and what is trying to read them? Cookies\session is only valid on the domain that set the cookie, you can't redirect to another domain and have that domain access the cookies\session set on the previous domain.
F-ES Sitecore 17-Aug-20 7:26am View
I think this is just a quirk with the Windows version of cURL, it needs the outer quotes to be double and the inner to be single.
F-ES Sitecore 17-Aug-20 7:13am View
Let's start with the basics. Is SQL server running on the machine you are connecting to? Is the connection string correct with the correct instance? Are you having any deadlocks? Is the SP actually running? Have you done a SQL Profile trace to examine the SQL calls and their results?
F-ES Sitecore 15-Aug-20 10:16am View
If you look at the result you get back from Cells[i].Value you'll see it has spaces, new lines, html etc, it doesn't contain just the text inside. Either compare to the data the grid is bound to, or use .Contains rather than "==", or use a function to strip all leading\trailing text you don't want.
F-ES Sitecore 14-Aug-20 9:01am View
Break that line down into individual statements, it will make it much easier to know exactly which bit has the problem. One of your "Where" statements is probably returning a null value.
F-ES Sitecore 13-Aug-20 12:19pm View
Something to give a try is using HttpRequestMessage instead of FromBody

see if that's at least seeing your json as a string, if it is you can just deserialise that string yourself to your CreateUpdate class.
F-ES Sitecore 13-Aug-20 11:11am View
You can get postman to generate the curl command for you by clicking on the "code" link and selecting cURL from the options. Does that work? If so alter it by removing things that don't appear in yours until it stops working and whatever you removed last will probably let you know what the issue was.
F-ES Sitecore 13-Aug-20 7:03am View
The header you're looking for is Referrer, as indicated by Richard in Solution 1, however this is generally only populated when someone navigates via a browser. If the call is one made programatically such as an API call then the referrer will only be filled in if the calling code supplies it, which it probably doesn't. If the referrer header doesn't contain the data you need then there is no way to get that data as anything can call your url, it doesn't have to be a website on a public domain.
F-ES Sitecore 12-Aug-20 8:02am View

Looks like you need to set TypeNameHandling to None and implement a custom serialization binder to restrict which types are deserialised.
F-ES Sitecore 11-Aug-20 15:10pm View
Define "didn't work". All your code does is navigate to the page, there is no attempt to read any data from it.
F-ES Sitecore 9-Aug-20 10:17am View
No, that's the request object. The error function has three parameters and the actual error is in the ones you're not using. Consult the documentation;
F-ES Sitecore 9-Aug-20 10:13am View
If you need to request that url to send the message then google "c# http request" and you'll find code for how to do it.
F-ES Sitecore 7-Aug-20 5:54am View
As you've already found out, you can't download files using ajax. When using ajax everything happens in javascript and js doesn't have write access to your hard drive so while it can process the request it can't do anything meaningful with the results. To save the file you need the browser's file downloader to kick in and that will only happen when the browser makes a request that has a download as the response, you can't instigate that process via js.
F-ES Sitecore 5-Aug-20 6:20am View
Not only are you just wanting other people to do your work for you, you can't even be bothered to tell people what language you're using so how can anyone possibly help you even if we did want to do your homework for you?
F-ES Sitecore 3-Aug-20 7:13am View
Check the documentation to see if there is any Dispose or disconnect methods you need to call to clean up the connection. Failing that ask whoever wrote the code as the issue is probably in that library.
F-ES Sitecore 31-Jul-20 5:50am View
It certainly makes it easier in some cases if you use a shared abstract class or interface, but I don't think it is strictly necessary. You can have a base class of Animal with a property "NumberOfLegs" and replace Animal with Cat and your NumberOfLegs property can continue to function even though you are not using abstract classes or interfaces.
F-ES Sitecore 30-Jul-20 15:18pm View
This was the first one when I goggled "c# upload file ajax", I'm sure there are other better ones
F-ES Sitecore 30-Jul-20 7:28am View
You can't upload a file via ajax like that. google for how you upload a file via ajax, it's very well documented.
F-ES Sitecore 29-Jul-20 6:17am View
That's not possible. You would be better explaining why you want to do this, ie what problem you're trying to solve, and someone might have an alternative solution.
F-ES Sitecore 28-Jul-20 6:57am View
Use the RegEx class' "Matches" method to return a collection of matching hits then process them one by one building your json string. If the format of the data is always the same (same properties) then it might be easier to build a collection of objects with those properties and serialise that collection into JSON.
F-ES Sitecore 23-Jul-20 12:51pm View
Not if you update the src of a hidden iframe or img tag. When you update the src the browser will request that url in the background and update the iframe\img with the result but as the element is hidden it doesn't matter what goes in there, the user won't see it.
F-ES Sitecore 23-Jul-20 7:18am View
You could have a hidden iframe or image and make the src property something like


where the values for p1, p2 etc are read from your form elements via javascript. Your "whatever.aspx" page will then process those values. How useful these things are largely depends on what you want to happen after you pass the data.
F-ES Sitecore 23-Jul-20 6:09am View
There are hacky ways to do it but if you don't mind using a form or ajax then just use them, that's the proper way.
F-ES Sitecore 22-Jul-20 13:33pm View
The Session.SessionID isn't suitable for this as it isn't unique, it is reused among visitors. Instead create a GUID for your users and store that in Session["userID"]
F-ES Sitecore 22-Jul-20 7:16am View
Google how to get the response from HttpWebResponse, then google how to save a stream to a text file. These things are all very well documented.
F-ES Sitecore 22-Jul-20 7:08am View
There is no way to do this. The problem you actually need to solve is why you can't use a form or ajax, so if you explain that someone might be able to help.
F-ES Sitecore 20-Jul-20 12:53pm View
Have you added anything to the "Start" event of the service?
F-ES Sitecore 17-Jul-20 8:28am View
What is the "dropdown()" function then? Where is that from?
F-ES Sitecore 17-Jul-20 7:38am View
Use view->source to check the raw html. If the right data is in the source then the issue is with your "dropdown" function\css classes.
F-ES Sitecore 17-Jul-20 6:13am View
You get the same ones as you are binding Repeater2 and Repeater3 to the same data as the code in Repeater1_ItemDataBound doesn't vary depending on the parent row.
F-ES Sitecore 16-Jul-20 8:33am View
I tried this code and didn't get any errors so there is something about the data you're using or other markup etc that is causing the issue.
F-ES Sitecore 16-Jul-20 6:51am View
Is the problem that it shows the "old" value or that you're getting a divide by zero? Show the mark-up where the value\inputs are shown and also indicate exactly what line throws the error.
F-ES Sitecore 9-Jul-20 9:53am View
You're going to struggle because can't access the client hardware like a webcam. Even the browser might struggle to do this. This is not a trivial subject and far beyond the scope of a "quick answer". I suggest you google for potential solutions.
F-ES Sitecore 7-Jul-20 8:56am View
Yes it's possible. If you want user-specific or temporary links then have a table with all valid link paths and the ID of the file it is for. When you create a link create a random key for it (or use a GUID), store that in your table and when someone uses it look up the ID of the file it is for and download it. You'll need a clean-up task to clear the links out after a certain age. If you don't want temporary links then your download system must have a unique url for each file so just send them that.
F-ES Sitecore 7-Jul-20 6:07am View
The "IsDefault" probably can't be converted to a SQL clause which is why it is being done that way.
F-ES Sitecore 3-Jul-20 12:36pm View
F-ES Sitecore 3-Jul-20 11:44am View
INSERT INTO attendanceout (out_ID, ID,

you are providing your own value for out_ID, but that column is controlled by the database, you let it select a value. So instead you do

INSERT INTO attendanceout (ID,

and update the "VALUES" close to remove the out_ID value from there too.
F-ES Sitecore 3-Jul-20 11:37am View
Yeah, the "other error" is probably the one I've warned you about in this post :)
F-ES Sitecore 3-Jul-20 8:44am View
This question is asked every day, please do basic research before asking a question like using google. Search for the error message or look at the many "Related Questions" at the right of the screen, you're going to get the exact same answer as all of those.
F-ES Sitecore 3-Jul-20 8:07am View
You need to disable caching on your pages so the browser needs to request them every time.
F-ES Sitecore 2-Jul-20 7:25am View
Consult the documentation about how to do what you want to do. It's not clear from your question what you're trying to do, but you won't be able to load files from the client system via js. If the xlsx file is on your server then you'll need to stream it from a url rather than accessing it by path.
F-ES Sitecore 2-Jul-20 7:00am View
Javascript to send email that only needs you to put your username and password in the script. What could possibly go wrong :)
F-ES Sitecore 30-Jun-20 10:04am View
There's probably a clue in the exception message.
F-ES Sitecore 27-Jun-20 12:42pm View
Google for how to consume a WSDL service, it is well documented. If you can't work it out by following a detailed step-by-step tutorial it is unlikely you'll be able to follow any help we can give you either.
F-ES Sitecore 26-Jun-20 11:08am View
Check you have the permissions to write to the folder you are writing to. For if you want to save files you should put them in app_data