I am trying to insert data to SQL server table with using C# ASP.NET. I watched a lot of tutorial video. If I create a button and double click on it, I see quite different codes from videos and other tutorials.
To make clear my problem, I added my and tutorials' code screenshots.
What shoud be the reason and how can I fix it?
This is from tutorials:
This is from my VS 2013
You used a Visual Basic template to create your project. Notice the source file in your screenshot is Default.aspx.vb. You'll need to create the project using the C# template.
Edit: I changed the screenshot to New Web Site instead of New Project.
Related
My main goal with SharePoint is quite simple, I want to develop an intranet heavily based on tables and forms by using a tool/designer which doesn't force me to code all new/edit forms for List entries.
Presently I have a custom form in SharePoint designer to edit a list entry and I would like to add server side code (c#) in order to implement some specific behavior, for instance run a custom Page_Load function.
The issue is that I'm not sure how to do it and which would be the best approach, most of the examples online show an approach using Visual Studio and creating a new list (couldn't even find a way to use an existing SharePoint list) and then code the forms from scratch which I don't want.
So how can I enhance the SharePoint Designer pre-built form (image below) with server side (c#) and client side code (js) ? If possible I would prefer to do it with Visual Studio but I didn't find a way to start customizing an existing Form aspx from VS.
My suggestion... if you don't mind using Server Object Model, you could use a Visual WebPart. It's encapsulated and promotes code reusability. From there, you could include client side code, or server side code. Personally I prefer VS to do this, but if you prefer SD, here is a walkthrough https://msdn.microsoft.com/en-us/library/ee231546.aspx
And here is a link on how to include it within an application page
Add a WebPart to an Application page
Hope this helps a bit
Before telling you anything i'd like to clear, I'm a completely beginner in ASP.NET. In fact, I started learning today ASP.NET.
So, I'm making an event that would bind my code with C# files. Well I'm good in C#.
But the problem is as I find into projects, there is no Default or any aspx.cs files here. Can you please help? Where can I find it?
This tutorial says that to bind events, you need to write code in .cs files.
Here is my how my project is setup:
I think you have choosen a wrong project type while creating your project.For your purpose you need to do following
File>New>Project
On the left panel Go Visual C# > Web
Select ASP.NET Web Forms Application
Looking at your screenshot it seems you selected "ASP.NET Empty Web Application".You can add files to this as well but since you are a beginner its better to follow above steps.
I wanted to make a small test site using the Metro UI framework (http://metroui.org.ua/)
So, I started up my newly installed Visual Studio 2013 and started a "new website". I added the neccesary css and js and made a very basic masterpage and default.aspx. But here comes the problem: the css does get loaded, but it doesn't get applied. Not in FireFox, not in IE, not in Chrome and not in the "Page Inspector".
It's quite weird, because in my previous VS2012 this same workflow for testing and experimenting with a framework just worked. I really can't find the problem. Maybe it has to do with my new Windows 8.1, my new Visual Basic 2013, maybe an programming error (although that would be very unlikely, since I checked everything).
I also tried installing the framework using NuGet instead of manually adding it. Same result: it does load, but it doesn't get applied.
Anyone knows what's happening here?
Thanks in advance!
According to MetroUI you have to follow 5 simple steps
Create page with HTML5 DOCTYPE
2.Include metro-bootstrap.css
Include metro.min.js (jquery.js required)
Create main container with class .metro
Use markup, as described in the pages of this site
In your posted images I can't find a container with class .metro . I'd really check the sample code from the posted page.
In case I misunderstood anything please let me know!
I am trying to learn to use C# with Microsoft Access files.
I want to Create a C# win Form App that opens a .mdb file, view the table and edits it
and saves it again.
I have been searching for examples for two days now and the only examples I find is apps that was written in 2001 -2003.
Can anyone please direct me to a good example or tutorial?
I use Visual Studio 2010
I will appreciate it a lot.
Here a great example : Access Database Editor in C#
And you can refer to Connecting to access database using code here on stackoverflow.com there is many examples there
Feature explained below is available in Microsoft Dynamics AX (formerly known as Axapta), an ERP application. However, my question is related to Visual Studio 2010 and MVC 3 application. Please find my questions after this feature explanation.
Screenshot #1 shows a method written in X++ (language used in Microsoft Dynamics AX) using the MorphX editor. If I select a text within double quotes and right-click on them, I will get the options as shown in the screenshot. This is true if the text begins with an # character and is a valid id found in the label file.
If I click on the option Lookup Properties/Methods, a tool tip will appear showing the actual text associated with the selected label id. Here in this case the label id is #SYS67 and its associated label text is Transaction date. Refer screenshot #2.
If I click on the option Lookup Label/Text, the label editor will appear with the label id pre-filtered along with other languages of choice at the bottom section of the editor. I can change the translation text in different languages using the editor. Refer screenshot #3.
In Dynamics AX, the label texts are stored in text files with label id and separated by a tab. Label ids always begin with # symbol. Here in the example shown #SYS is the group prefix and the given number is a sequential index. Refer screenshot #4 that displays text found in an en-us label file.
I understand that this is similar to Resource editor in Visual Studio where the translation text are stored in .resx files for each language. I would like to do something similar for an ASP.NET MVC 3 application using SQL Server database as the data store for the translation text.
Here are my questions:
What would I need to create in Visual Studio 2010 to achieve this functionality so I can invoke the translation editor in the IDE? Would that be a plugin or extension?
Would a similar resource provider be possible to do in an ASP.NET MVC application, where I can just specify the label id within double quotes and have provider model fetch the data from database during runtime? Is the syntax Resources.MyResource.GetLabel("#SYS67"); the only available option in ASP.NET? Sorry, if the resources syntax is wrong.
Are there any similar tool set (plugin/extension) already available for Visual Studio?
I believe that one of the terms to do translation in ASP.NET application is making use of Resource Provider Model. Are there any other terms? I am interested to know the term of what I am trying to achieve so I can search on the web to read more about it.
Any inputs will be really appreciated.
Thanks in advance.
Screenshot #1:
Screenshot #2:
Screenshot #3:
Screenshot #4:
I'm going to jump in here and give you what I know. I apologize if it doesn't completely answer your question but I don't want to stray too far from what I am familiar with and thus give you bad advice.
From the way you describe your issue, it seems that you could use the resource files (RESX) for translations, the issue is more that you want to know how to edit them in a manner that is user friendly. Further, some users may want to edit the translations on the web.
To answer this part of your question, I would recommend that you look at this article:
http://blog.lavablast.com/post/2008/02/07/RESX-file-Web-Editor.aspx
The author seems to have a similar issue as you and the conclusion the author arrived at was similar to what you are thinking about. The source code is provided so you could get a head-start if you wanted to pursue this method.
If you are going to pursue rolling your own editor, I would suggest that you choose one interface and stick with it. Otherwise you will be increasing your development time on something that isn't your actual product. Since you want the web for some users, I would suggest you would stick with the web for everyone. However, if you really want to pursue an plugin for Visual Studio, I would recommend that you put as much code into a central business logic layer as possible so that your presentation layers don't take up much of your time.
As for currently-available options, I don't think any of the following are Visual Studio plugins, but they all do a good job at working with localization:
http://www.redpin.eu/index.html
http://www.lingobit.com/products/index.html
http://www.sdl.com/en/language-technology/products/software-localization/sdl-passolo.asp
If you want to learn more about the terminology and practices of localization, I would recommend the following site:
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/localization/localization.aspx
If you want to store information in a database instead of a .resx file, here is a resource that will show you how to do it:
http://msdn.microsoft.com/en-us/library/aa905797.aspx