|
Thanks, Yusef, I'll take a look. The url supplied was a "not found" - maybe a typo? Could you redo, please? Thanks!
|
|
|
|
|
|
Thanks Yusef - looks like it might be putting me on the right track. Appreciate your time.
|
|
|
|
|
Does it have to be a shortcut key? That would be a little tricky to set up in a way that is truly cross-browser, cross-OS compatible, but it would be pretty easy to have a clickable image (or text) next to each box that would do this using JavaScript.
|
|
|
|
|
Interesting idea. Got an example anywhere? Might be a good idea.
|
|
|
|
|
well, use a JS function such as:
function setNow(txt) {
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear();
document.getElementById(txt).value = curr_date + "-" + curr_month + "-" + curr_year;
}
and then call it from whatever textboxes you want like this:
<input type="textbox" id="box1" /> <a href="#" onclick="setNow('box1')">today</a>
|
|
|
|
|
Thanks, NeverHeardOfMe. Doesn't work for me to only use javascript and change my textboxes to non-asp.net textboxes. I'm going to have multiple date asp.net textboxes on the page, and within any of the textboxes, I need to be able to call the shortcut to render the current date, so if they could be asp.net textboxes, your code would work. But, I need the functionality of the asp.net textbox. I tried to get the text of the asp.net textbox to be a hyperlink, but it renders the text literally today. If I could get around that, it'd be wondermous. Any ideas?
|
|
|
|
|
NeverHeardOfMe - found it! This works: <asp:textbox id="mytext" runat="server" onclick="setNow('myText');"> Thanks so much for pointing me in the right direction.
|
|
|
|
|
Well, posh. Almost there. The textboxes are actually in a gridview, footer and edit rows. So, I tried this in the textbox on the footer row as a test: onClick="setNow(this);" and it didn't work. So I tried putting name="textBoxName" as well as id="textBoxName" on the control. Didn't work. Know of a way around this so that the javascript can get the correct argument? Thanks.
|
|
|
|
|
You need to do it all in the RowDataBound event - find the textbox and use its ClientID property as the argument for your function call - which you will also have to build dynamivally in the same place.
|
|
|
|
|
I have a application that is running live , I want to run the application on my local system so that some changes can be made.
I am attempting to use the Enterprise Library Cryptography block to encrypt a credit password in my ASP.NET 3.5 application. Everything is configured correctly,and not getting any error when I build he application but When I call the DecryptSymmetric () method, I get this error:
The system configuration source is not defined in the configuration file.
[System.Configuration.ConfigurationErrorsException] = {"The system configuration source is not defined in the configuration file."}
Stack trace:
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceFactory.Create()
at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, Byte[] ciphertext)
at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, String ciphertextBase64)
at UserControls_LoginUserControl.SetUserAthent
My web.config contains the following (relevant) sections:
<configSections>
<section name="OnLineStudentPortal.Data" type="OnLineStudentPortal.Data.Bases.NetTiersServiceSection, OnLineStudentPortal.Data" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<location allowOverride="false" path="Application">
<enterpriseLibrary.ConfigurationSource selectedSource="File Configuration Source">
<sources>
<add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" filePath="entlib.config"/>
</sources>
</enterpriseLibrary.ConfigurationSource>
</location>
pz let me know What is the solution of the above issue. I am searching it on google from last 4-5 hrs but did not get any solution , please let me know if any body have any other finding or anything I have missed .
|
|
|
|
|
Are you sure entlib.config is in the right folder and that it is formatted correctly with all of the required info? The first google hit[^] when searching for your error shows an example with all three files, but you only show two.
|
|
|
|
|
I have changed only ProtectionKeyFilename in entlib.config section
like this
<securitycryptographyconfiguration>
<symmetriccryptoproviders>
<add algorithmtype="System.Security.Cryptography.RijndaelManaged, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
="" protectedkeyfilename="G:\Projects\Application\OnLineStudentPortal.key" protectedkeyprotectionscope="LocalMachine" type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricAlgorithmProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="SecureInfo">
I am not analyzed that what changes i have to do? can u pz tell me what other more chages i will have to make in my application.
modified on Friday, August 27, 2010 1:56 AM
|
|
|
|
|
Hi
I have a wizard, which contains a series of custom user controls as steps. Also I am using the step navigation template to add in the navigation buttons.
However, due to some steps needing a little time to load fully due to web service calls and having to add some dynamic steps, I would like to disable the navigation buttons until the next step has been loaded and change the text on the "Next Button" to "loading...". Is there away I can do this perhaps with JavaScript or is there away I could do this with an AJAX control? If so, does anyone have an example I could use?
Thanks
|
|
|
|
|
I am using version 3.1 of Enterprise Libraries and used the EntLibConfig app to configure my logging options. I set it up to send me an email if an exception occurs.
I am doing this to allow Ent Lib to handle the exception:
bool rethrow = ExceptionPolicy.HandleException(ex, "Clerical Exception Policy");<br />
<br />
if (rethrow)<br />
throw ex;<br />
What I get is an error coming back saying 'Logon failure: unknown user name or bad password'
The exception appears to be when it calls GetExceptionPolicy.
However, I am not doing anything, or shouldn't be doing anything, that requires a username and password. Inside the EntLibConfig application I set the 'RequirePermission' flag to False under the Exception Handling section.
Any idea's what could be causing this? I did try using impersonation inside my web.config and no luck. Thought maybe the ASP.Net account didn't have permission to do something.
Thanks.
|
|
|
|
|
Hi,
I am developing a sample project using MVC and Entity framework. just wondering to know how can I use silverlight? Is it possible? Does silverlight pages use instead of aspx pages?
thanks in advance for your help,guys.
|
|
|
|
|
Hi,
In old style i used to return datasets to BOL (From DAL) and then to Website. but in 3.5 is there any new way to construct DAL. i heard about returning List<> is better than DataSet. Please suggest me which is the best way.
I Got to build new DAL for my new project. if i should go for List <> aprroach can i use Linq to Sql technique or shall i go for execute dataset (using applicatio block libraries) and then fill data in List<> prior to return it back to BOL.
Thanks
Naidu
vrsanaidu
asp.net webdeveloper
|
|
|
|
|
I voted this as a bad question not because it is a bad question but because it is not a good one. Some one keeps marking questions as good when they are, in-fact, neither good nor bad.
There are a lot of ways to construct a DAL and there are many tools which will purport to do all of the work for you. However, there is one thing none of those tools will do and that is help you to understand the business requirements. Time and again I see duplicated and wasted effort from DAL Generator based systems because no one took the time to ask why, knowing, it is trivial to rewrite the DAL.
Personally, I prefer hand coding, if for no other reason that it forces me to understand the object graph that is being constructed and to choose the most effective manner for doing so without fighting a tool-kit. Write your DAL yourself and you will learn a lot. 3.5 makes it really easy with automatic properties.
Below is a quick sample, it is real easy and there is no magic anywhere. Any developer should be able to figure this out:
public class Customers : List<Customer>{}
public class Customer : IEntity{
public Int32? Id{get;set;}
public string Name{get;set;}
public DateTime CreateDate{get;set;}
internal static Customer Create(SqlDataReader reader){...}
}
|
|
|
|
|
Some of the most common reasons people give for using List<T> instead of datasets are:
Datasets are big and come with a lot of overhead.
Datasets are subject to more runtime errors due to data type issues.
List<T> gives you access to all sorts of cool extension methods in Linq which are also compile time checked versus using sql filters on datasets which are runtime checked.
You could jump straight to 4.0 instead of 3.5 and use Entity Framework[^].
|
|
|
|
|
Once upon a time I lived in hope that someone somewhere could show me the correct way to structure an application and pass data between the layers.
I gave up, because there is no right way.
There is virtually no point in trying to figure out whether it's better to pass around DataSets, Lists, XML, or some other representation of your data.
You would not only have to figure out the verious pros and cons of each method, you'd be confused into a stupor by trying to seperate facts from the quasi-religious views of the very "experts" that would be offering to reveal the facts.
So. Forget for one second that there are Datasets and Lists etc. Figure out what constraints are in place, then figure out what service you're Data Layer needs to perform and then work from there.
For example...NHibernate is cool, but If your organisation won't let you install NHibernate then NHibernate is out immediately. Simples.
Next try and figure out as many different ways of moving data around that fit within your constraints. Actually build a few vertical slices of applications. You'll learn more from doing this that from reading 100 pro/con articles.
DataSets have some powerfull features for tracking changes to data. DataSets are also wonderfully simple to bind to.
If you code custom business objects and pass around lists, are you prepared to do the work necessary to replicate that functionality? Do you even need to replicate it?
Is your DataLayer adding any value. I can't count the number of times I've seen Business Layer Objects that pass their data to a Data Layer Object that do nothing more than pass the same data through to the Database.
This might be worthwhile if there was a potential for swapping out the Data layer, but that's so rarely the case.
Of late I have become very fond of domain objects that are completely ignorant of the database. There is no DB logic in there at all. The domain objects don't even know about the Data Layer objects.
I don't really care about DataSets, Lists, XML, NHibernate etc. Those are implementation details, the big issue is the persistence ignorance.
That's not to say that persistence ignorance is always the way to go. The project I'm working on right now doesn't use it because I'm working within contraints that were already in place when I arrived. And that's fine.
Worrying about Datasets vs Lists without knowing the big picture is like obsessing over a Sedan or an SUV even though you have no idea where you'll be driving or how many passengers you'll have.
If I could sum up my philosophy on this I would say the following:
Build Apps using the simplest solution possible until you know enough to justify why a more complicated solution gives enough long term advantages to justify itself.
If someone doesn't know whether they should use DataSets or not then they should use DataSets until they figure out why they shouldn't.
Hope that helps.
|
|
|
|
|
Hi people,
Sorry if this isn't the right place to post this. I have posted my message already in the Visual Studio forum but still didn't get any answer. I also posted it in asp.net forums and in MSDN forums and still nothing. I have also searched the web without much success. I am hoping someone here can help me figure out what is going on.
Here is the link to my post in the VS forums: http://www.codeproject.com/Messages/3573698/Issues-with-VS-2010-editor.aspx[^]
I would like to add that I have the same Visual Studio 2010 Premium edition installed on two PCs, one is working well and the other is having the issue mentionned above. I would appreciate any insight or suggestion about this crazy matter.
Thanks,
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Do not cross-post: if you didn't get an answer the first time it's because no one has the answer or doesn't want to answer: all that happens now is that you are very unlikely to get the answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Anyway I think I know what the problem is.. in HTML edit mode, check which doctype it's targetting. It's a dropdownlist next to the buttons to comment things. So be sure to target the correct doctype.
hope this helps
"My personality is not represented by my hometown."
|
|
|
|
|
Thanks for replying, is this the target validation schema validation you're talking about or is there another dropdown that I need to find?
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
that's indeed the dropdown I'm referring to (wasn't sure about the name; didn't have VS open at the time)
"My personality is not represented by my hometown."
|
|
|
|