|
Hi michaelschmitt,
thanks for replying.
I am still getting same error.i have define datatype of image in my table.while opening word file ,i recieve error that word can not start the converter mswrd632.
plz provide me solution.
thanks in advance.
no knowledge in .net
|
|
|
|
|
Hi,
i must admit, i'm a bit confused concerning your problem.
You get binary data from your sql-server, which is actually an image?
You want to write that to a doc file???
You use Response.[SomeWriteMethod] for that?
There is some mixup, i'm sure.
What your code basically does, is , it writes the binary data you retrieved from your sql-server (on server-side) to your responsestream (so someone can download it using the browser).
There is no interaction with any file on your client-harddrive. You cannot directly write to a client file from your server-page.
Maybe i'm just not understanding you correctly. Maybe someone else can help or you can describe a little bit more what youre trying to archive.
|
|
|
|
|
Hi,
I want to convert the total price in my crystal report to word. I have write the following formula:
formula1 : TruncateValueStr
towords(truncate(sum({@TotalStylePrice}),0))
formula2 : num2word
{@TruncateValueStr} + " and " + ToWords ((Round({@TotalStylePrice},2) - Int({@TotalStylePrice})) * 100, 0)
the output of the formula2 is:
forty-four thousand five hundred eight and xx / 100 and eight
The output containing xx/100 for fraction number. what is the solution to avoid xx/100.
I have googleed but there is no perfect solution. Please Help me. Its Very Argent.
Bye
Take Care
|
|
|
|
|
Hi
You can use following code to convert amt into words. Use it in your formula field,
numbervar RmVal:=0;
numbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="Rupees ";
Amt := 25,12,000 ;
if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
Amt := Amt - Rmval * 10000000;
if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " lakhs"
Else
If RmVal > 1 then InWords := InWords + " " + ToWords(RmVal,0)+ "Lakhs";
Amt := Amt - Rmval * 100000;
if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);
pAmt := (Amt - truncate(Amt)) * 100;
if pAmt > 0 then
InWords := InWords + " and " + towords(pAmt,0) + "paisa only"
else
InWords := InWords + " only";
UPPERCASE(InWords)
|
|
|
|
|
Hi. I have a situation where I need to use Page Methods instead of posts backs on an ASCX control. But I cant find a way that doesnt involve putting code in the main aspx page(which I cannot do due to specifics of the project).
I also cannot create a web service. Basically each ascx control needs to be self containing and not call anything else.
P.S. Update panels work for what I need, but are SLOW SLOW SLOW.
Thanks
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
roguemat wrote: Hi. I have a situation where I need to use Page Methods instead of posts backs on an ASCX control
Hi, I'm gonna guess you are talking about asp.net ajax.
roguemat wrote: But I cant find a way that doesnt involve putting code in the main aspx page(which I cannot do due to specifics of the project).
To do this you can use ScriptManager.GetCurrent(Page);
if you have a ScriptManager on your page already.
roguemat wrote: I also cannot create a web service. Basically each ascx control needs to be self containing and not call anything else.
Well yeah they need to make a web request I guess.
roguemat wrote: P.S. Update panels work for what I need, but are SLOW SLOW SLOW.
Well update panels use what we call ajax so they are just as fast
as any request made by browser.
Did I guess any thing right ?
|
|
|
|
|
daveyerwin wrote: Did I guess any thing right ?
Only the first one.
daveyerwin wrote: To do this you can use ScriptManager.GetCurrent(Page);
Has nothing to do with PageMethod
daveyerwin wrote: Well yeah they need to make a web request I guess.
I'll give you this one also just for stating the blatantly obvious.
daveyerwin wrote: update panels use what we call ajax so they are just as fast
An ASP.NET UpdatePanel still goes through the page life cycle so yes it can be slow. Making a direct out of band AJAX call is much faster
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: daveyerwin wrote:
To do this you can use ScriptManager.GetCurrent(Page);
Has nothing to do with PageMethod
thsi has to do with
roguemat wrote: But I cant find a way that doesnt involve putting code in the main aspx
Mark Nischalke wrote: An ASP.NET UpdatePanel still goes through the page life cycle so yes it can be slow. Making a direct out of band AJAX call is much faster
The UpdatePanel control represents the nerve center of the server-centric programming model of ASP.NET AJAX. It lets you execute server-side code and return updated markup to the client browser. You may wonder how this differs from classic postbacks. The difference is in how the postback is implemented-instead of a full page refresh, the UpdatePanel control manages to send an out-of-band request for fresh markup and then update the DOM tree when the response is ready.
from msdn
When, in the page life cycle would this "direct out of band AJAX call"
be made ?
Oh yeah , thanks for the "blatantly obvious" I'll take it
edited for formatting
modified on Wednesday, April 21, 2010 11:53 PM
|
|
|
|
|
Trace through the events that occur when an Update panel is used. From your MSDN lookup, "The difference is in how the postback is implemented". Postback is not eliminated, just modified. On the other hand a direct AJAX call skips it all.
Using PageMethod is essentially creating a web service that is hosted by the page and thus skips all the overhead assocaited with UpdatePanel.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: The difference is in how the postback is implemented".
An update panel does "a direct AJAX call".
(how can an indirect call be made ?
)
Check and see if updating an update panel
calls isPostBack.
Mark Nischalke wrote: On the other hand a direct AJAX call skips it all.
In order for an ajax call to have an effect on
the web page you will have to impliment in your
own code that which was "skipped".
PostBack is a microsoft invented term which can
mean a regular http post request like you would
submit to an aspx page or a webservice, it can
also mean a direct ajax call.
Definition of postback from webopedia ...
A mechanism introduced in the Microsoft ASP.NET to allow the communication between client side and server side.
Mark Nischalke wrote: Postback is not eliminated, just modified.
Here we see that by definition a direct ajax call
is cetainly a "postback" which is not eleminated
by direct ajax call , just modified.
At the bottom of this top heavy pyramid is the
XmlHttpRequest object or its activex equivelant.
It is used by update panel and by direct ajax
call.
|
|
|
|
|
Don't understand what points you are trying to make. We'll just leave it as a misunderstanding in terminology and processes.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: Don't understand what points you are trying to make. We'll just leave it as a misunderstanding in terminology and processes.
I will be more than happy to clear up any
misunderstandibgs you may have
|
|
|
|
|
|
Thanks! Seems perfect.
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
I am a little bit confused; please share your experiences with me.
I need to design a portal for internet users. This portal is going to interact with tow other
Databases that located in tow different servers, one is sql2005 and the other one is mySql,
So I need to update, insert, delete, select most of the time and I need lots of security.
What’s the best way to interact with these tow databases?
Using the web Services or make a connection directly to the servers.
But I think web services act so slowly than making a direct connection to the servers. But in case of security, web services are more secure.
What’s your idea? Is there any other way?
-------
Arlen.N
|
|
|
|
|
Either way can be secure or insecure depending on configuration and usage.
A webservice will allow for a more distributed architecture. Again, depending on configuration and usage it is neither faster or slower than a direct connection.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I implemented custom membership provider by deriving from MembershipProvider class. I added login control to my web page and associated my membership provider with my custom database, where I`m keeping all users. This works great.
Whats more, I would like to enable 'Change password' scenario by using the standard ASP.NET control. I created dedicated web page for it and put this control onto form. When I`m willing to change my password (after I logged in to my web application), GetUser(string username, bool) method is being called from my custom membership provider. It`s cool, but why I`m getting my OS login name instead of the login which I used to log onto my web site? In other words: assume that I logged into my web application with {user: User1, password: qwert} credentials. I expect that GetUser method will pass 'User1' as a first argument. Currently it passes '[domainName]/[WindowsLoginName]'.
I believe there is some magical switch in IIS (I`m using v7.5) or web.config file. Could you please help me?
|
|
|
|
|
Have you set the web.config to use your custom implementation or is it still the default provider?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
It is using my custom implementation - otherwise loggin feature would not work
|
|
|
|
|
Hi, all,
I use Asp.net 2.0.
I create a ImageButton in a gridview row with category ID, when click it I will call function to show or hide all the rows with the same category ID, everything works fine. But the problem is that every time the button is click, the postback is called, how can I stop that? or have any better way to achieve my purpose,
Thanks a lot.
|
|
|
|
|
Are you calling a javascript function to show hide the rows, if yyes just return fasle from that javascript function
|
|
|
|
|
Hi, Brij.
Thank you for your reply.
When click button I call a function in .cs file. Can I avlid postback if use this way?
I also search internet and try to user javascript to solve it, but failed. To access gridview row information like the following, I put it in block.
But this doesn't work, get error "Object Required" in line: rows = document.getElementById(gridName).rows;
also ask a silly question, since the javascript block is inside <head runat = "server"> </head>, it will executed in server side or client side?
Thanks
|
|
|
|
|
Itll be better if you use updatepanel then your posstback wont occur only your grid will be updated.
And how to use updatepanel Have a look
|
|
|
|
|
Hi, Brij,
I got an error "Unknown server tag 'asp:ScriptManager'.", what should I do to use it?
|
|
|
|
|
If you are visual studio 2005, then you need to install Ajaxextentions, Download from here
Then a new template would be added in vs2005, that is ASP.NETAjaxEnabledWebsite create website of that template and it;ll work.
In vs2008 or later it is not required.
|
|
|
|