|
Did you try to search on google?[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
string filename = System.IO.Path.GetFileName(filepath);
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
Response.Flush();
Response.WriteFile(filepath);
Venky
|
|
|
|
|
Could I use sql Express edition which is already installed in the vb.net 2008 to build a site.
|
|
|
|
|
y_mmohd wrote: Could I use sql Express edition which is already installed in the vb.net 2008 to build a site.
Who is stopping you?
Anyways, for developent you can use anything but as per MS EULA you can not use this in production environment.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Dear,
thank you for help,
But my question is related to a question before i had ask.
I want to build a web site containing a forum and users.
my first question, could i use sql express edition for this site
my second question, could i deploy and host this site using sql express edition
thanks for hlep
|
|
|
|
|
y_mmohd wrote: my first question, could i use sql express edition for this site
Yes
y_mmohd wrote: my second question, could i deploy and host this site using sql express edition
No
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I want to show OS VERSION and SERVICE PACK on a web page of the computer viewing the page on my intranet.
I keep on getting the server`s details.
It is a ASPX page with VB code behind
Can someone help me. . . ?
|
|
|
|
|
|
Hi,
I have some questions regarding application pools and the different types of web sites in asp.net.
As far as I understand, an application pool will reset after 20 min idle time by default.
But once that occur, we are experiencing a huge perf hit when accessing the first page in the site.
I get the impression that the site will start recompiling again.
The project type is the vs.net 2005 "web Site" project that does not compile the codebehind into a static dll in the bin folder
I can't recall ever having this problem when I have worked with the older "web Project" projects.
So is the problems I'm experiencing related to the fact that the codebehind is not precompiled and that the reset of the app pool throws away the compilation result of the previous worker processes?
or is the perf hit simply related to alot of overhead in starting up the worker processes?
Any ideas?
Will the problems go away if we change the project into a "web project" with precompiled codebehinds.
Or is the only solution to only allow the app pools to reset once every night or so?
|
|
|
|
|
A general answer to your post would be, Yes.
Precompiling the page will save you a lot of startup time.
I would untick the idle timeout, and instead recycle the processes at night when noone is using the homepage (if that's an option that is)
No recycling at all would be a bad advice though.
The default IIS setting seems to have the purpose to make it possible for even badly programmed pages with memoryleaks (AKA Crystal Reports) to work fairly well
|
|
|
|
|
Thanks,
Precompiling took care of the problems.
I do think that 20 min idle is way too drastic for the reset, but that is not up to me to decide here.
|
|
|
|
|
Just keep in mind that the app-pool idle timeout has to be the same or longer than the asp.net session timeout
|
|
|
|
|
Hi
We've encountered an authentication problem in a live-environment. Everything went fine in the test and stage environments. I'm out of ideas and need your help!
Setup:
- Impersonate is set to true in web.config
- Anonymous access is turned off
- Windows authentication is turned on
Authorization:
I have a setting in web.config, let's call it "AdministratorsGroup" and then I use this in the master page using Page.User.IsInRole to see if the current user is part of that active directory domain group.
This works perfectly fine in our test environments, but once installed in a live environment, an exception is thrown:
"Error in the relation between the confidence/reliance of the main domain and the domain which it relies on. "
Any idea's on what might have happened?
|
|
|
|
|
I have just started learning LINQ. i making DAL and i want DAL to return dataset like it used to be in .net 2.0. so that i can use data with any control. Or do need to do it with by running foreach loop? the code is like this
public IQueryable sel(int intCatID)
{
LINQPracticeDataContext db = new LINQPracticeDataContext();
var products = from p in db.MyProducts
where p.CategoryID == intCatID
orderby p.UnitPrice descending
select new { p.CategoryID, p.ProductName,p.UnitPrice };
return products;
}
|
|
|
|
|
Hie all,
I have got a small problem, im using the code below to close a page. It works only when its under a button(ie button click event) but when i use a toolbar click event its not closing the page, even though it runs through the code without any errors. does anyone know whats wrong.
protected void RadToolBar1_ButtonClick1(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
{
if ((e.Item.Text == "Save & Close")
{
string scriptString = "; window.close();
Page.ClientScript.RegisterClientScriptBlock(this.GetType()), "submitScript", scriptString);
}
}
|
|
|
|
|
That's a wrong implemenation that you are providing i think
omlac wrote: but when i use a toolbar click event
Register your script in PageLoad by using Button
RadToolBar1.Attributes.Add("onclick", "javascript:window.close();");
where RadToolBar1 is your button id on clicking of which the window should close ?
Sorry but which event are you talking about ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Thanks
im doing everything in the radtoolbar clickevent, i have got a lot of other items on toobar, say "save" button and "save & Close" , so only when i click Save & close is when i want to close the page.
does the line RadToolBar1.Attributes.Add("onclick", "javascript:window.close();"); allow me to close only when button on toolbar is "save & close"
|
|
|
|
|
Yes,I supposed that "save & close" text is of RadToolBar1 button ?
Are you showing any pop up window which are having all this button ?
My code will close the window whenever user click RadToolBar1 button
Could you explain what are you trying to do ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
this radtoolbar is on a popup form. the toolbar has a number of items and i want to execute code depending on the item clicked on the toolbar.
|
|
|
|
|
Hi all,
I have requirement of capturing the opened webpage of my application.
In my webpage i am placing a button'btn_Capture' to capture the webpage.
If i click on button the whole web page should be converted into image(Except the btn_Capture).
Please suggest me how to achieve this.
Thanks inadvance,
|
|
|
|
|
|
Thanks metillica_rock10.
I will try those links.
|
|
|
|
|
I got the logic.
Here is logic i am pasting for others.
Code In VB.Net
==============
Imports Microsoft.VisualBasic
Imports System.Threading
Imports System.Drawing
Imports System.Windows.Forms
Private Class HtmlToImage
Private PageUrl As String
Private ConvertedImage As Bitmap
Private m_intHeight As Integer
Public Property Height() As Integer
Get
Return m_intHeight
End Get
Set(ByVal value As Integer)
m_intHeight = value
End Set
End Property
Private m_intWidth As Integer
Public Property Width() As Integer
Get
Return m_intWidth
End Get
Set(ByVal value As Integer)
m_intWidth = value
End Set
End Property
Public Function ConvertPage(ByVal PageUrl As String) As Bitmap
Me.PageUrl = PageUrl
Dim thrCurrent As New Thread(New ThreadStart(AddressOf CreateImage))
thrCurrent.SetApartmentState(ApartmentState.STA)
thrCurrent.Start()
thrCurrent.Join()
Return ConvertedImage
End Function
Private Sub CreateImage()
Dim BrowsePage As New WebBrowser()
BrowsePage.ScrollBarsEnabled = False
BrowsePage.Navigate(PageUrl)
AddHandler BrowsePage.DocumentCompleted, AddressOf WebBrowser_DocumentCompleted
While BrowsePage.ReadyState <> WebBrowserReadyState.Complete
Application.DoEvents()
End While
BrowsePage.Dispose()
End Sub
Private Sub WebBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
Dim BrowsePage As WebBrowser = DirectCast(sender, WebBrowser)
BrowsePage.ClientSize = New Size(Width, Height)
BrowsePage.ScrollBarsEnabled = False
ConvertedImage = New Bitmap(Width, Height)
BrowsePage.BringToFront()
BrowsePage.DrawToBitmap(ConvertedImage, BrowsePage.Bounds)
End Sub
End Class
/////////////////////////////
In C#.Net
=========
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Drawing;
namespace HtmlToImage
{
class ImageFromHtml
{
private string PageUrl;
private Bitmap ConvertedImage;
private int m_intHeight;
public int Height
{
get { return m_intHeight; }
set { m_intHeight = value; }
}
private int m_intWidth;
public int Width
{
get { return m_intWidth; }
set { m_intWidth = value; }
}
public Bitmap ConvertPage(string PageUrl)
{
this.PageUrl = PageUrl;
//ThreadStart thrCur = new ThreadStart(new EventHandler(CreateImage));
Thread thrCurrent = new Thread(new ThreadStart(CreateImage));
thrCurrent.SetApartmentState(ApartmentState.STA);
thrCurrent.Start();
thrCurrent.Join();
//ConvertedImage.Save(@"D:\imges.jpg");
return ConvertedImage;
}
private void CreateImage()
{
WebBrowser BrowsePage = new WebBrowser();
BrowsePage.ScrollBarsEnabled = false;
BrowsePage.Navigate(PageUrl);
BrowsePage.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(WebBrowser_DocumentCompleted);
while (BrowsePage.ReadyState != WebBrowserReadyState.Complete)
{
Application.DoEvents();
}
BrowsePage.Dispose();
}
private void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser BrowsePage = (WebBrowser)(sender);
BrowsePage.ClientSize = new Size(Width, Height);
BrowsePage.ScrollBarsEnabled = false;
ConvertedImage = new Bitmap(Width, Height);
BrowsePage.BringToFront();
BrowsePage.DrawToBitmap(ConvertedImage, BrowsePage.Bounds);
}
}
}
//////////////////////////////////////
Using the above Class from code behind.
In widows application:
======================
ImageFromHtml image = new ImageFromHtml();
image.Height = 800;
image.Width = 1020;
Bitmap img = image.ConvertPage("http://www.google.com");//Website name to capture
img.Save(@"D:\imge.jpg");// Save the image in D:\ directory
In Web Application:
===================
//Add the above class in your 'App_Code' direcory of project. Add reference of "System.Threading,System.Windows.Forms,System.Drawing"
//Or Its better to Create a Class Library project for above Class "ImageFromHtml". And add the .dll as reference to your website.
//Place a One button on Form
//In Button_Click Event Write the below code
ImageFromHtml image = new ImageFromHtml();
image.Height = 800;
image.Width = 1020;
Bitmap img = image.ConvertPage(Request.Url.ToString());//This is url of your application which is running.
img.Save(@"D:\imge.jpg"); //Saving image in D directory
Cheers,
sekhar
|
|
|
|
|
Hello friends
I want to deploy my application on linux server , I've heard about the mono on linux i will be thankful if some more information is provided
Thanks and regards
sindhu tiwari
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Hi,
How can i capture windows Download dialog box events??
Eg, I m opening file download dialog box. Then I want to know what user do on that, means which button he press, "Save", "Open", "Cancel" or "Close".
How i know which event fires??
Please help in this regard.
Thanks in advance
|
|
|
|