|
i like to know how could we add culture or country code in url of asp.net webform project.
i search lot but found none such. i found few article they show how to set culture in code just render data from right resource file but none show how to add culture or country code in url.
i want when i will start my project then then url would look like http://localhost:port/gb or http://localhost:port/en-gb
and right country code or culture code will be added in other links in of the page.
there will be country flag when user click in germany flag then german country code or culture code will be added in url.
please advise me how to do it. it would be better if some one shared few article links which show how to add country code or culture code in url whose code i can download and run in my pc.
thanks
|
|
|
|
|
Hi,
I'd like to create a website based on a decision tree to help users in their choices. In my mind, I'd like a graph with boxes viewing all the possibilities (on the background webpage) and a lightbox showing the choosing step. After each choice, the graph will be updated to show the way and the lightbox is updated with the new question.
Is there an example here for this kind of request ? Or, where can I found a example to help me in this task please ?
|
|
|
|
|
|
|
I am using the WebBrowser Control and am running into problems with some web sites. I had to put the control into IE 11 emulation mode for the web sites that I visit. I notice that the auto complete doesn't work when I use the WebBrowser Control, but if I hit the web site with a normal web browser the functionality works fine. Is there a option for the WebBrowser Control to allow this functionality?
I am using the WebBrowser Control to log into web sites without the users knowing/sharing the password.
|
|
|
|
|
I think your over estimating the practical use of the control for your purpose.
I use it for scraping website content and data and pumping HTML into it for progress and status messages while scraping.
By the way, this topic is for ASP.net and your question belongs in VB or C# Questions
How to customize
WebBrowser Customization (Internet Explorer)
If it ain't broke don't fix it
|
|
|
|
|
|
Good day Friends! Please how can I add code tag in my asp.net app? I tried using INSTR function so that in return I change font style and colour but no luck. E.g <dcode>Private Sub...i used dcode instead of code so that codeproject won't treat it as code. Help please.
|
|
|
|
|
What?
Otekpo Emmanuel wrote: so that codeproject won't treat it as code Just paste it in and a popup will appear where you can pick code. Or, click the code tag in the toolbar of the editor.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
You are right
GobblesGobbles
Also we can tag
which automatically comes when you copy paste or write the code in code editor
|
|
|
|
|
Hi,
I am trying to use a string compare with a static string with a File name, the File name is very big like this: "BSC_gMax_BSC_gMax_PROD_20170721001923.xml_EXCEPTIONS_b77022d0-7176-469a-9e83-5182b59a0cba.xls" but I want all the 31 Alphabets irrespective of case from the file name to compare with the static string I have
For example I want to check the string which has 31 alphabets: BSCgMaxBSCgMaxPRODxmlEXCEPTIONS is satisfying with the File name, then return true. I can only use the regular expression though because its running dynamically.
I tried the following: "[a-zA-Z]{0,31}", "[a-z]+" and "[a-zA-Z]{0,31}$" none of them worked for me so far though, but any advice and suggestion going to be very very helpful. Please I can only use regular expression, I am also searching but if you are familiar it would be great help thanks in advance my friends.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Hi
I'm not the world's greatest expert in regex, but
[a-zA-Z]{1,31} will return all the matches you want - you can test it on regex.com[^].
After that, you need to concatenate them into a single string - this Stackoverflow[^] page may help you with that.
|
|
|
|
|
No need for a regular expression - you just need to extract the letters from the string.
With LINQ:
string input = "BSC_gMax_BSC_gMax_PROD_20170721001923.xml_EXCEPTIONS_b77022d0-7176-469a-9e83-5182b59a0cba.xls";
string output = new string(input.Where(char.IsLetter).Take(31).ToArray());
Without LINQ:
string input = "BSC_gMax_BSC_gMax_PROD_20170721001923.xml_EXCEPTIONS_b77022d0-7176-469a-9e83-5182b59a0cba.xls";
char[] buffer = new char[31];
int bufferIndex = 0;
foreach (char c in input)
{
if (char.IsLetter(c))
{
buffer[bufferIndex] = c;
bufferIndex++;
if (bufferIndex == 31)
{
break;
}
}
}
string output = new string(buffer, 0, bufferIndex);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
In a C# 2010 web form application, I have found some JavaScript statements that will not allow the application to execute when I am using the Internet Explorer browser since some of the objects are obsolete/deprecated. However when I run the application using Firefox, I find that the application runs. I have also noted that some of the Javascript objects in the web form application may be deprecated in the future and to use these items with caution.
Thus if I deploy a new version of the current web form application and tell all users to only use Firefox in the next few weeks, I will create a static executable that everyone can use. Then when some of the objects are not allowed in Firefox, the application will still run since I have not changed the executable, correct?
Would I need create a new version of the application with the Javascript changes that are required?
If this is not true, would you let me know why and potentially what I should do to solve the issue?
|
|
|
|
|
dcof wrote: Would I need create a new version of the application with the Javascript changes that are required? I don't quite follow what you are asking, but if you find you are using old JavaScript that some browsers no longer support I suggest you update your code to be current. In my opinion, there is no need to create a new version of the application, just update your javascript and deploy the updated javascript.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
As far as I know when you deploy an application that includes the javascript. How do you deploy the javascript separately?
|
|
|
|
|
All you have to do is copy the files.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I am not very familiar with javascript. I only know enough to make minor changes. Thus how do you copy the javascript files? I know that the files end with .js and they are at various locations within the entire solution file. Wouldn't I have to copy all those files to the same directory structure on the server that hosts the website?
|
|
|
|
|
dcof wrote: Wouldn't I have to copy all those files to the same directory structure on the server that hosts the website? Yes, but aren't they already there? So, if you change one file in development you only need to copy that file to production.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi,
I have a Web application which is connecting a Database called 'xxxxDashboard', when I try to access this same Database using Sql Server Management Studio I am able to and access all the tables. But if the same login happening from the WebApplication that I have on my machine, its not allowing me, its giving me the error
as below that login failed for the user and machine. This is a Web Api Web application running from IIS not from IIS Express or not from the External Host etc but purely from local IIS.
Cannot open database \"xxxxDashboard\" requested by the login. The login failed.\r\nLogin failed for user 'ABC\ABCWL753274$
The underlying provider failed on Open.
Source: Entity Framework
Stack Trace:
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func<code>1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery</code>1.<>c__DisplayClass7.<GetResults>b__5()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func<code>1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery</code>1.GetResults(Nullable<code>1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery</code>1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator<code>1.MoveNext()
at System.Collections.Generic.List</code>1..ctor(IEnumerable`1 collection)
Fully qualified name:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ibdashboardservice\954176a0\e5e5593e\assembly\dl3\74937bd0\007175d9_0e55d001\EntityFramework.dll
My connection string is as below, is there any problem in my Connection string:
<add name="InventoryDashboardEntities"
="" connectionstring="metadata=res://*/IBDashModel.csdl|res://*/IBDashModel.ssdl|res://*/IBDashModel.msl;provider=System.Data.SqlClient;provider connection string="data source=xxxx569s,xxxxx1;initial catalog=InventoryDashboard;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providername="System.Data.EntityClient">
Is there any problem in my Connection String?
Any help would be greatly helpful thanks in advance my friends.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 30-Oct-17 17:41pm.
|
|
|
|
|
Since the error says that the login has failed, you should ensure that the user ABC\ABCWL753274$ is a valid login and database user.
Remember that if you use integrated security, the connection is opened using the credentials from the background process.
|
|
|
|
|
ABCWL753274 is not my user name its just my machine name, is it trying anonymous login that's the information I am looking for. But the ABCWL753274 is just my machine name as far as I know.
My connection string is as below, is there any problem in my Connection string:
<add name="InventoryDashboardEntities"
connectionString="metadata=res://*/IBDashModel.csdl|res://*/IBDashModel.ssdl|res://*/IBDashModel.msl;provider=System.Data.SqlClient;provider connection string="data source=xxxx569s,xxxxx1;initial catalog=InventoryDashboard;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework""
providerName="System.Data.EntityClient"/>
Is there any problem in the above Connection String?
But if I use the below Connection String, its giving me the error as below:
<add name="InventoryDashboardEntities"
="" connectionstring="Data Source=WSQL569S,50101;Initial Catalog=InventoryDashboard;Integrated Security=True" providername="System.Data.SqlClient">
The error it is showing is:
The context is being used in Code First mode with code that was generated from an EDMX file for either Database First or Model First development. This will not work correctly. To fix this problem do not remove the line of code that throws this exception. If you wish to use Database First or Model First, then make sure that the Entity Framework connection string is included in the app.config or web.config of the start-up project. If you are creating your own DbConnection, then make sure that it is an EntityConnection and not some other type of DbConnection, and that you pass it to one of the base DbContext constructors that take a DbConnection. To learn more about Code First, Database First, and Model First see the Entity Framework documentation here: http://go.microsoft.com/fwlink/?LinkId=394715
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 30-Oct-17 18:36pm.
|
|
|
|
|
indian143 wrote: is it trying anonymous login that's the information I am looking for
The connection isn't anonymous. Looking at your connection string
indian143 wrote: ...;integrated security=True;...
you're connecting using the credentials from the running process, IIS in this case.
As said, you should ensure that this is a valid login and user or switch to SQL Server authenticated login.
Have a look at Authentication in SQL Server | Microsoft Docs
About the computer account, please see 2.2.2 Computer accounts
modified 31-Oct-17 0:32am.
|
|
|
|
|
Hello all,
I've been trying to wrap my brain around how to do this and coming up with nothing. I'm a beginner developer and creating my first .net MVC site for a company project.
I have the following tables: Projects, CalendarDates, and Bookings.
The bookings table accepts the cross ref between Projects/CalendarDates and has a field for booking value.
I've successfully been able to create the grid view with the list of projects by row with datas across the columns. This works perfectly.
What I want to do is make the entire table editable and if there's an empty cell, create a new record in the bookings table based on the Project Row and Date Column it intersects.
|
|
|
|
|
Hi,
I am getting errors while running the npm install with the command: npm i at the Powershell. Here are the errors that I am encountering with
Binary is fine
npm ERR! path C:\GitRepo\ASP.NET\IBDash\IBDash\node_modules\fsevents\node_modules\getpass\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'C:\GitRepo\ASP.NET\IBDash\IBDash\node_modules\fsevents\node_mod
ules\getpass\node_modules'
npm ERR! { Error: EPERM: operation not permitted, scandir 'C:\GitRepo\ASP.NET\IBDash\IBDash\node_modules\fsevents\node_
modules\getpass\node_modules'
npm ERR! stack: 'Error: EPERM: operation not permitted, scandir \'C:\GitRepo\ASP.NET\IBDash\IBDash\node_modules\
fsevents\node_modules\getpass\node_modules\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'scandir',
npm ERR! path: 'C:\GitRepo\ASP.NET\IBDash\IBDash\node_modules\fsevents\node_modules\getpass\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aaleem01\AppData\Roaming\npm-cache\_logs\2017-10-25T18_48_17_052Z-debug.log
Any idea can help me, so far I don't that freaking software is npm never got installed properly never ever. Any help is going to be very helpful - thanks in advance my friends.
And when I did this: npm install -g fixmynode, I got the below error, always errors
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\aaleem01\AppData\Roaming\npm\node_modules\fixmynode\node_modules\userid
gyp ERR! node -v v8.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! userid@0.1.2 install: <code>node-gyp rebuild</code>
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the userid@0.1.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aaleem01\AppData\Roaming\npm-cache\_logs\2017-10-25T20_25_39_973Z-debug.log
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|