|
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
|
|
|
|
|
Use Javascript Validation on controls, that works on client side only.
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
I'll try to condense this as much as I can and include only the relevant information.
This works:
protected void Page_Load(object sender, EventArgs e)
{
string hey = "<script language=JavaScript>alert(\"Agh!\");</script>";
this.RegisterClientScriptBlock("key", hey);
... much snipped for brevity ...
... but this doesn't:
... in Page_Load():
Button saveStart = new Button();
saveStart.Text = "Save";
saveStart.Click += new System.EventHandler(Save_Click);
}
protected void Save_Click(object sender, EventArgs e)
{
CheckInitialization();
... much snipped for brevity...
protected void CheckInitialization()
{
if (i == 64)
{
string hey = "<script language=JavaScript>alert(\"Agh!\");</script>";
this.RegisterClientScriptBlock("key", hey);
... much snipped for brevity...
Any idea why not? I've run it through the debugger and verified that the "if" conditional is entered. For some reason, though, I don't see the alert box in the second code.
Am I opening it on the server, perhaps? If so, what can I do with RegisterClientScriptBlock to get it to run on the client?
I'd appreciate any insight you could lend.
|
|
|
|
|
Hi there...
( I m not expert but I will try my best )
In the second one, u have created a button and initialised its click event.. but how will this click event gets fired ?? how will this click event gets triggered ???
so, the second code will not work as that alert is in click event and click event is not getting fired..
If u want the click event to get fired, please add this button to some panel or to some div or to placeholder as per ur comfort...
hope I made some sense...
|
|
|
|
|
Thank you for your reply.
Unfortunately, I can verify that the click event does fire, since it reaches a breakpoint I place on the "if" statement whenever I click the button.
|
|
|
|
|
This will register the script in the head tags
You can replace the embedded url with a static url
Dim cs As ClientScriptManager = Me.Page.ClientScript
Dim rsType As Type = Me.GetType()
If (Not cs.IsClientScriptIncludeRegistered(rsType, "jquery")) Then
cs.RegisterClientScriptInclude("jquery", cs.GetWebResourceUrl(rsType, "Admin_PM_Standard.jquery.js"))
End If
[EDIT]
try and use Page_Init instead of Page_Load
|
|
|
|
|
Hello,
I've been looking all over the web for a solution to this problem. I'm trying to find all the control IDs on a specific page from a different page when I pass the page's name. For example, I open Page1.aspx and I click on a button to get a list of control IDs on a second page Page2.aspx.
I found the following code on the Internet but I keep getting errors when I run it. I believe this code tries to open an instance of the page into memory, read the control IDs, and then close the page. However, I keep getting an error "Validation of viewState MAC failed".
Type type = BuildManager.GetCompiledType("~/Page2.aspx");
if (type != null)
{
Page myPage = (Page)Activator.CreateInstance(type);
myPage.ProcessRequest(HttpContext.Current);
}
I also have the following code for getting all the controls on a page from within the page (Page1.aspx). I need a similar code to get he controls on a different page.
private void getControlList(System.web.UI.Control control, ArrayList resultCollection)
{
foreach (System.Web.UI.Control childControl in control.Controls)
{
System.Web.UI.WebControls.WebControl webControl = childControl as System.Web.UI.WebControls.WebControl;
if (webControl != null)
{
resultCollection.Add(control.ID);
}
if (control.HasControls())
{
getControlList(control, resultCollection);
}
}
}
Any help is very much appreciated.
Thanks!
|
|
|
|
|
popup window is not working fine in chrome and mozilla, but its working fine in IE.
Could any one help me in that?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Not a good question. How can we possibly tell you what is wrong if you haven't told us what is going wrong; i.e. the specifics of the problem?
"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
|
|
|
|
|
Information is not appropriate but you can check for Pop blocker Setting in your browsers.
Turn Them OFF
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
Hi, Is the sample code to have a GridView with row insert and row footer to display totals. Thats a gridview with multiple row footers basically.
Please help.
Regards
Stagga
|
|
|
|
|
For an Idea you can workout with rowdatabound event of gridview
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
Hi,
-- modified 21-May-12 13:44pm.
|
|
|
|
|