|
i m using asp.net(1.1)(C#) as frontend and sqlserver2000 as backend. how can i create report in pdf format?
|
|
|
|
|
By buying an SDK that generates pdfs, or looking for a free one.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You'll need some SDK for that.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How I can redirect to the local area network database from internet?
Ejaz
|
|
|
|
|
Hi,
I have an aspx file with code behind written in VB .NET. During one of the events a Word Document is to displayed on to a new webpage. I used Response.Write to create a new window but it did not work for me. Please see the code below. I would like to know a way to open a new webpage to display the word document created.
Protected Sub btnPrint_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnPrint.Click
ViewState("message") = ""
ViewState("PrintMail") = 1
validateForm(Me)
If Len(ViewState("message")) > 0 Then
Session("errMessage") = "The following fields must be filled in:" + " " + ViewState("message")
Exit Sub
End If
'Generate Patient 's Discharge Summary
CreateDoc("")
'Open Discharge Summary so user can print as many copies as possible
Session("draft") = 0
Session("print") = 1
Session("docfile") = ViewState("FileName")
Response.Write("open """ + Application("hostserver") + ViewState("FileName") + """,'Draft Discharge Summary','status=no,menubar=no'")
End Sub
|
|
|
|
|
Wow - this looks to me like you have a background in classic asp ?
You can use response.BinaryWrite to write a file, you also need to set the MIME type
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is there a particular reason you are writing VBscript to the client? As a general rule you should use Javascript for your client-side code, as many browsers will not run the VBscript.
And rather than use response.write, try creating a string vasriable with the required javascript (window.open...etc) then register that script on the client. (RegisterClientScriptBlock)
Fred
|
|
|
|
|
My site uses forms authentication (login control etc) to grant users access to the site.
Is there a way to programatically get their username once they have logged in ?
Thanks
|
|
|
|
|
Yes.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
It has been a long time since I last worked with this stuff, but you can try the Page.User.Identity.Name property, or see if you can get what you need by using the Membership.GetUser()[^] method.
Jon Sagara
Once again, the conservative sandwich-heavy portfolio pays off for the hungry investor! *slurp* Oh, I'm ruined!
-- Dr. Zoidberg
.NET Blog | Personal Blog | Articles
|
|
|
|
|
Yes, You can do it. There are various method available but the simplest way is to use 'cookies' , like this,
' on "Login.aspx.vb" page
Dim uname As String = Login1.UserName
Dim pwd As String = Login1.Password
e.Authenticated= FormsAuthentication.Authenticate(uname,pwd)
If FormsAuthentication.Authenticate(uname, pwd) Then
FormsAuthentication.RedirectFromLoginPage(uname, True)
Response.Cookies("CokieLogin").Value = uname
Else
Login1.FailureText = "Either User Name or Password is wrong."
End If
'On "Default.aspx.vb" page
Dim UserName As String = UCase(Request.Cookies("CokieLogin").Value)
'here we expire the cookies
Response.Cookies("CokieLogin").Expires = System.DateTime.Now()
prabhakar
|
|
|
|
|
I have The Menu in javascript on master page
and On content pages There are drop down lists
when we extract the menus The Drop down List On Content Page
Comes Over The javascript Menu In IE no problem with mizilla
Is there any Solution....
Thanks
swapnil
swapnil
|
|
|
|
|
This problem occurs while we are not designing our controls in tables. Try again your designing with in the tables.
To create a table do the following steps,
File > Layout > Insert Table >
Thanks,
Selvendran. P
|
|
|
|
|
My Drop down list is in proper table structures
Is There any other thing u want to say...
swapnil
|
|
|
|
|
I am combining 2 images on the fly and wanting to make the background of the 2nd image trasnparent. When the image is a gif the MakeTransparent Method works well but when its a jpg, it is very rough around the edges.
Any ideas will be helpful.
Jpg Example. We removed the background on the card case
<%<br />
Bitmap bitMapImage = new System.Drawing.Bitmap(Server.MapPath("photos/3092.jpg") );<br />
Graphics graphicImage = Graphics.FromImage(bitMapImage); <br />
graphicImage.SmoothingMode = SmoothingMode.AntiAlias;<br />
graphicImage.DrawString( "LOGO HERE", new Font("Arial", 12,FontStyle.Bold ), SystemBrushes.WindowText, new Point( 40, 150 ) );<br />
Bitmap myBitmap = new System.Drawing.Bitmap(Server.MapPath("upload/3003.jpg") );<br />
Color backColor = myBitmap.GetPixel(1, 1);<br />
myBitmap.MakeTransparent(backColor);<br />
graphicImage.DrawImage(myBitmap, 0, 40, myBitmap.Width, myBitmap.Height);<br />
Response.ContentType="image/jpeg";<br />
bitMapImage.Save(Response.OutputStream, ImageFormat.Jpeg);<br />
myBitmap.Save(Response.OutputStream, ImageFormat.Jpeg);<br />
graphicImage.Dispose();<br />
bitMapImage.Dispose();<br />
myBitmap.Dispose();<br />
%>
|
|
|
|
|
I found this code in DotNetNuke:
switch (Operator)
{
case SomeEnumerator.Equal:
return Blah(parameters);
break;
...
...
}
There were three case statements in there, and all of them essentially looked like the one I showed above. The compiler was generating warnings about the break statements being unreachable code (which in fact, they are).
This is the only place this was done. Why on earth would anyone let that warning go when it's so easy to fix?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: This is the only place this was done.
You mean this was the only case statement in which it was done? or the only switch statement in which it was done?
Either way, I think they just forgot to remove it as I don't see why would anyone keep it
-- 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
|
|
|
|
|
perhaps because C# is crap, and will generate errors if you don't have a break after ever case statement, so they automatically put it in, and then didn't remove it, just in case ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: because C# is crap, and will generate errors if you don't have a break after ever case statement
Actually, the return statement is fine.
"A jump statement such as a break is required after each case block, including the last block whether it is a case statement or a default statement."
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Christian Graus wrote: perhaps because C# is crap, and will generate errors if you don't have a break after ever case statement
Actually that's just fine for me, prevents a lot of people producing a lot of bugs (compared to C++ where the break is not necessary).
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Hi,
I have a window-based application having a web-browser control in it. In web browser control i access a web-based application hosted on remote server. Web-based app can only be accessed via window-based web browser control. A user needs to login in window app. To implement user rights on different pages of web app i need to pass user's id from window app to web app.
Now i want to know how to share data between window app to web app.
Any help will be appreciated.
Thanx,
Anand
|
|
|
|
|
|
Hi All,
I would like to use a control on my page to be able to play MPEG file as they are uploaded to the page.
Can you please give me any information on how to go about it?
Thanks very much.
|
|
|
|
|