|
How can I get Application Settings Key Values of web.config through Java Script?
Please any one help...
|
|
|
|
|
You can't.
You have to get the value in the server code, and either create Javascript code that recreates the value, or put it in a hidden field where the Javascript can access it.
---
single minded; short sighted; long gone;
|
|
|
|
|
You need to read it in the codeBehind to a protected variable like
protected string strAppTitle = ConfigurationSettings.AppSettings["AppTitle"];
Then in the JavaScript, you can use
var strAppTitle = "<%=strAppTitle%>" ;
|
|
|
|
|
Use AJAX to call a server function for getting the values from web.config
Thomas
|
|
|
|
|
Hi All,
Have any one worked on paypal integration. I need IPN Code. I mean how to Update Database after complete Transaction.
Please Help
Thanks in Advance.
|
|
|
|
|
Dear All,
I am making web application using Asp.net C#(Visual Studio2005).
i am facing problem while generating report in local mode. i explain what i did.
i fetched the data to dataset(dataset1.xsd). i made report( through add new item -> report named it report.rdlc) now in new aspx page i placed dropdownlist and button(to run the report). and reportviewer to show the report. sometime it execute the output but some time its show the following error like
• An error has occurred during report processing.
o Exception has been thrown by the target of an invocation.
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
Even through i execute Sp with that veriable . it show the output .
What is the problem .
please help
thanks
regards
imran khan
|
|
|
|
|
is it possible to create a table in database and specify its columns dynamically at run time through programming and how.please reply if you have any idea regarding this
thanx
prashant jain malviya national institute of technology
|
|
|
|
|
What database you using? I think you can alter the table structure with the stored procedure or you can you temporary tables. But with my little experience I believe that it is not a good practice to change table structure in runtime.
Thomas
|
|
|
|
|
thanx for reply . iam using sql express database that comes with visual studio 2005. actually iam working on web mail project, so iam thinking to crate a new table dynamically as soon as a user registered to my mail server to store all his related data. i am not having any idea of mail server , how it works, if you any other idea please reply
thanx again
prashant jain malviya national institute of technology
|
|
|
|
|
To create a table in runtime uses a stored procedure. But I wondered why you create a new table for each user? Suppose if 1000 users registered in your system, your database will have 1000 tables!!!!!!!!!!!!!!!!!!!!!!!!
Thomas
|
|
|
|
|
yes it may be bad idea, is there any idea you know how to maintain a database in case of web mail server like yahoo on any sidev link where related stuff can be find
thanx forv reply
prashant jain malviya national institute of technology
|
|
|
|
|
You can dynamically create table using same query as we use in creating a table in MS SQL (CREATE TABLE). But creating table for each user is a bad idea...
|
|
|
|
|
yes it may be bad idea , do you know any other idea of maintaining data in web mail server like yahoo, orkut or any site link
thanx for replying
prashant jain malviya national institute of technology
|
|
|
|
|
You can maintain the data in normalized database. Say, User's information will be in a Table, All the messages of the users will be in another table with a reference and so on. If you are not so good at Database, then try XML. But Database is best way.
|
|
|
|
|
thanx for replying . is the database in yahoo mail etc , is maintain in same manner . is it effective to store the complete mail as a string in the table .do you have any website site link descussing on this topic.
thanx
prashant jain malviya national institute of technology
|
|
|
|
|
i am working .net for the first time, i am working to make a web mail server like orkut , if any one can give me any hint or link explaining the flow means how the database is maintained, like message to be stored as string in table or somewhere in memory.
thanks to all
prashant jain malviya national institute of technology
|
|
|
|
|
Hi friends,
I have a page with a dataview binded to a datatable. I want to delete all the rows with a checkbox marked on it.
The problem is that in the button's OnClick event the DataSource property of the DataView is NULL. I cant have access to it in order to know the IDs of the marked rows.
How can I do this?
Thanks averyone
|
|
|
|
|
You need to cache the datatable because in every post back the datatable will be cleared.
Thomas
|
|
|
|
|
In which event you are binding the DataView?
|
|
|
|
|
just declare your DataTable as static , and get data in DataTable like..
public Static DataTable dt = new DataTable();
if(!IsPostBack)
{
dt = //some binding code...
}
now you will not lost data from datatable..
bye have a nice day.
Chirag Patel
|
|
|
|
|
Thanks a lot to all of you.
JustChiragPatel, your solution was the one!!!
|
|
|
|
|
-->We been doing our first website,"Security Web Control" like "Log In" "login view" are the most commonly used in asp.net.
if our security web control composed only on a html control,what will be the difference?we were not able to set up a Membership role and profile in ASP.NET Website Administration Tool ?becuase we manually make our original "Security web control"..
-->and why always aspnetdb.ndf is always a default database?
what if we make our database using MS Access?can we access it or make it a default website in a ASP.NET Website Administration Tool?now can it b done?
what are the alternatives way to used if im not going to used a ASP.NET Website Administration Tool? to set up membership?...
-->When im modifying a connectiom of the database(in a database explorer In Visual Web Develper)?im only used the Microsoft Access Database File (OLE DB) native Jet Provider and Microsoft SQL Server Database File (SqlClient)-(a mircosoft Server Instance including MS SQL express)..but in other provider,the "servername" always ask, and when i type the server name,im only got error like when i modified connection MS SQL Server(Connect to Microsoft SQL Server 2000 and 2005)...
Im always modified the server name in the SEt Up Wizard using aspne_regsql but i always got err0r..
Hope all my question can clearly answred
Thanks for always helping....
|
|
|
|
|
like any other tutorial, i been set up for a see how to add the membership-related schemas to an existing database using the ASP.NET SQL Server Registration Tool (aspnet_regsql.exe).
ive run the command aspnet_regsql.exe..asking for my server name and there are drop down list for the database,but when i click the drop dowm list,it will take a while when an error msg has appeared,on my second attempt. i didmt click the database drop down list instead the button "Next" the one i clicked, now "Setting SUmmary" has appeared and when i click "Next" button it will take a while and the error msg has been appeared sayinf this:
Setup failed.
Exception:
Unable to connect to SQL Server database.
----------------------------------------
Details of failure
----------------------------------------
System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
--- End of inner exception stack trace ---
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()
i dont know how to figure it out...
THank You for the answer....
|
|
|
|
|
I did this a long time ago and don't remember what I used so I'm hoping someone here will have an idea.
I used a data structure in a function that took a string parameter that I passed in. A data structure in that function would insert the string if it didn't already exist and it would raise an error if it did. That way I could easily tell if I was working with a repeated string value in a series of data related events.
I am having total brainlock and don't remember what I used... Anybody got an idea?...?
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my vengeance, in this life or the next. - Gladiator
I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
|
|
|
|
|
Really annoying me now cos I have seen this so many times in my project and am yet to work out exactly why it wont work. I have about 10 textboxes all with validation controls. Some with two.
For some reason the page goes nuts in IE 6. Firefox displays it exactly as expected. When you press the submit button it changes the page again and different elements go nuts.
I have been through my CSS, checked all code from the browser and the rest but still no obvious reason for it. If I remove some of the validation controls it stops happening but there is no pattern to it.
Any body seen this before?
One more thing. IE 6 is a piece of sh*t!!
|
|
|
|