|
Is the exception being thrown on the dev box or a server?
It would help if you posted some code.
Maybe it's just that (out of memory) if you're in your dev box and have lots of things open (like visual studio) and the dev box has not a lot of resources.
Also, call GC.Collect() and verify if you still get the problem.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Out of memory exceptions are usually down to recursion - are you running a loop to process? Perhaps you're not incrementing a loop counter and it's processing the first record over and over...
C# has already designed away most of the tedium of C++.
|
|
|
|
|
In my asp.net application retrieving xml tag values to a control using recordset but its not working in firefox but working fine in I.E.
|
|
|
|
|
Member 8196580 wrote: retrieving xml tag values
What are tag values?
Their elements or atributes, and I don't think the web browser has anything to do with it, because it's done on the server side. So that means that in firefox, your html is not valid.
|
|
|
|
|
Experts,
I am working on a Email validation. My requirement is i have to check for the email does not contain hyphen(-) repeated continuously for 2 times.
Example:
a-b-c@d.com – valid
a—bc@d.com – not valid since hyphen(-) occurs continuously for 2 times
I have to validation both in code and also using javascript. I have written a method like comparing the charactes and incrementing the local variable. But is there any quick process for this?
Your help would be highly appreciated.
|
|
|
|
|
|
padmanabhan N wrote: But is there any quick process for this?
if string.contains("-")
FileName = FileName.Replace("#", "_")
|
|
|
|
|
Did you even bother to read the question?
1) email address not filename
2) the OP is looking for repeating characters, not every instance
3) the characters are not being replaced
Failure is not an option; it's the default selection.
|
|
|
|
|
I read the question, but I broke the rule of providing a clear comprehensive answer for email address.
The replace was just a quick way to to correct the double hyphen on the server side. Just food for thought.
string.replace("--", "-")
on the JQuery/Javascript side, I would just use regex, I haven't tested the regex for double hyphen, but I should today.
var re_EmailAddress = new RegExp("\\w+([-+.']\\w+)*@\\w+([-.]\w+)*\\.\\w+([-.]\\w+)*")
var txt_EmailAddress_Validate = $('[id*="_txt_CreateNewAccount_Email_Field"]').val().trim();
var match_EmailAddress = re_EmailAddress.exec(txt_EmailAddress_Validate);
if (match_EmailAddress == null) {
}
else {
}
I suppose there is a way to step through the email address in Javascript one char at a time, and get the position of the first hyphen, and check for a hyphen after the first occurrence. But I'm not going to experiement with that right now.
|
|
|
|
|
Hi,
As Mark noted, it may be easiest to solve this by using Regular Expressions.
On the server side you should use the Regex class found in the System.Text.RegularExpressions namespace.
A simple pattern to match exactly two repeated hyphens looks like "-{2}" . If you want to match 2 and more consecutive hyphens, the pattern may be modified to "-{2,}" . Then you can use the IsMatch method from the Regex class to test a string (In your case the email) like this:
Regex regex = new Regex("-{2}");
bool isValid = !regex.IsMatch(emailString);
On the client side is even easier. You can use the same pattern with the RegExp JavaScript object.
Then, call its test method. Something like this:
var regex = new RegExp('-{2}');
var isValid = !regex.test(emailString);
var isValid = emailString.search(/-{2}/) == -1;
I hope this is helpful
2A
modified 24-May-12 4:48am.
|
|
|
|
|
Dear All,
I want to develop an Hospital Management System, that will include EMR(Electronic Medical Records)
This will be a Huge Application, But i am Stuck, From Where to Start.
I am Developing in .Net and Ms Sql
So, if any one has already developed something like this. I have already started work on this.
Any Scope documents, Features List, DFD etc
All Help is Appreciated
Thanks in Advance
Santosh Pathak
Business Analyst| Project Manager
www.regaliya.com
|
|
|
|
|
santosh_pathak wrote: Any Scope documents, Features List, DFD etc
You need to make one for yourself.
santosh_pathak wrote: I want to develop an Hospital Management System, that will include EMR(Electronic Medical Records)
Good. Now, your first step should be to find out what all a hospital management system need to have. You need to explore by yourself. Start with limited features you can think of.
santosh_pathak wrote: This will be a Huge Application, But i am Stuck, From Where to Start.
How do you know it will be huge until you know what all it will cover?
Follow these in order:
1. Gather the requirements of the project
2. Design the database for the requirement
3. Design solution architecture for it
4. Define object models and class for the data
5. Plan the UI to capture/show data
6. Implement features step-by-step
Try!
|
|
|
|
|
Thank You Sandeep
Noted !!!
Santosh Pathak
Project Manager | Business Evangelist
www.regaliya.com
|
|
|
|
|
It's poor form to post the same question on multiple forums. Questions should be asked on one forum only.
|
|
|
|
|
Hi All,
I need to create a document management system.
In this we need to generate multiple Appointment Letter to send Email to different customer, However i Will have only one appointment template(May be in MS Word, which is easy for editing).
Some thing similar to mail merge but email address should come from sqlserver.
I search around google and found VSTO will solve this.
Please Advice me.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
Are these documents system generated? For instance, will the user click a button then have the documented created? If so then you don't need VSTO, you can use Word Interop to insert the email address into the letter template before sending to user.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi all, first of all thanks for taking the time to look into this.
My scenario is the following:
ASP.NET 4 Web Forms app distributed in 4 layers (C# projects):
1 - UI (Web Forms)
2 - DomainModel (Behavior and Data. This layer has no knowledge of the other layers)
3 - DAL (Get data from the database to fill the domain model)
4 - Service (This layer is responsible for managing calls from Web Forms, fetching the data from the database and filling the model)
So what happens is, once the user loads a certain user interface, there is a particular area where the user interface constantly changes depending on the user input. And all the rules for those are on the domain model. So for example:
User types XYZ on field 1:
Fields 2 and 3 show up because user typed XYZ on field 1.
If user types ABC on field 1:
Then Fields 4 and 5 show up because user typed ABC on field 1.
Internally, when the user changes the value of a text box or dropdownlist, the codebehind updates the model with that value and the model returns the new fields that need to be set. This works quite well, with update panels and the roundtrips to the server.
The problem starts when the user is in a far away location. Example: Server US, User Spain.
It takes a long time for the user to have its data refreshed on the update panel so he can't be effective on filling the fields, they usually are a lot of fields so we are having a productivity bottle neck with this.
A way to solve this issue is to bring the rules to client side as javascript, but I'm running away from it for several reasons:
1 - I'd need to replicate the business rules on javascript. This means that I will loose lots of the C# OO features and this is can get really risky, since the rules can get complex.
2 - This would create a sync problem. If update one model, the other would need to be updated as well, this is a high risk of someday falling out of sync, if they ever get in perfect sync at all.
3 - I don't like the idea of having client side code containing too much information about the underlying business rules.
Now, without touching the hardware infrastructure, do you have any suggestion on the approach on how mitigate this problem? Obviously distance is the main problem here and I can't bring the user closer to the server and vice-versa.
If the scenario is unclear, please let me know what else I can explain.
I appreciate any suggestion on this matter.
Regards
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
You write javascript to validate on the client side, and leave the server side validation intact.
If the javascript is written well, then the server side validation will always pass on the first postback, changing the users perception that the site is sound.
There's nothing wrong with 2 sets of validation.
|
|
|
|
|
The thing is that is not validation only. There is behavior. New controls are created on the fly based on the users decision to input other fields.
All of these are based on complex business rules implemented with the help of full blown object orientation design.
Edit:
Sorry, forgot thank you for your input.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
You can do wildcards with jquery, or bind certain control types to validate functions, and javascript does support regex.
As far as dynamic controls goes, you make dynamic javascript.
|
|
|
|
|
Thanks again for your input, I'll certainly consider it, but I don't think I can replicate the business rules with regex and jscript without making a big mess and having a high risk of not reflecting the real underlying business model.
If I try to do it I may endup have an entire business model based on javascript. And that's what I am trying to avoid.
Thanks again for your input.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
So you finally got bit by the Update Panel and Microsoft Validators.
I dumped the use of them 3 years ago, and now I plan everything without them.
I learned that lesson the hard way, and had to rewrite everything with a whole new way of thinking.
I had a problem with the update panel being sort of jittery, and the user was never sure if the click went through. The progress indicator took too long on the round trip from the server, and needed to be instant.
All you can do is keep the code and use Akamai Edge Technology, or shift it all to JQuery, or a mixture of both.
As long as the user sees something happening right away, they will wait. They just need a signal. Basically you need to smooth out your gig, so it's silkly smooth looking, while the background transmissions can be erratic.
|
|
|
|
|
jkirkerx wrote: So you finally got bit by the Update Panel
Definitelly...
jkirkerx wrote: I learned that lesson the hard way
I'm thinking that might be my case as well, couz I don't have time to rewrite everything. I'm trying to think of a solution that does not cost me a lot of time and improve the performance.
jkirkerx wrote: As long as the user sees something happening right away, they will wait.
They can't wait in banking business. If it takes too long, it won't work, because you know, time is money. Imagine having to fill 30+ fields and having to wait 2 to 4 seconds for everyone of them. The processing indicator doesn't help with that
I wish I could touch the infrastructure to work it out, but I can't. Well, I'll keep thinking and maybe there will be a solution sometime. To me, the best thing is if the code behind could be cached locally (can it?) to avoid the roundtrips, that would solve my problems.
Anyway, thanks for the suggestions, wish me luck
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
No it can't be cached locally, because only the server can process asp.net code, the browser only supports script like Javascript and Jquery. There are some other scripts that can be ran, but it's still script.
I use Jquery now, and web services to replace the update panel.
I've worked with Google Maps, AdSense, You Tube, and noticed that they use tons of Javascript with web services. Check out a You Tube interface, when your on the movie, above the movie is a javascript / json web service that populates the posters movie collection. It's true data on demand, so the initial page load is only visible data, but you can open a container, and that container will populate on demand, providing more data only if needed.
[ Concept ]
You could build a base structure or framework container with asp.net, and populate or paint that container with Javascript that produces new html objects dynamically, validate with a new set of javascript, and then send the anwsers back using a web service. With Javascript, you can wipe the container clean, get a new set of controls via web service, and repeat the process.
Just keep the information on tap for the future, the next time you write a web based app, you may want to consider doing it the Google way.
I think that half of the Microsoft controls were developed in house as a quick way to provide more features, but were never really tested in a production environment, in which they are too slow, or just unstable.
|
|
|
|
|
jkirkerx wrote: No it can't be cached locally, because only the server can process asp.net code, the browser only supports script like Javascript and Jquery. There are some other scripts that can be ran, but it's still script.
Of this I'm aware, I was thinking more like a a local web server, like a plugin or something...
jkirkerx wrote: Just keep the information on tap for the future, the next time you write a web based app, you may want to consider doing it the Google way.
I'll certainly consider it.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|