Here is a usefull function for getting current url:
function GetCurrentURL() {
$url = '';
if ($_SERVER["HTTPS"] == "on")
{
$url .= "https://";
}
else
{
$url .= "http://";
}
if ($_SERVER["SERVER_PORT"] != "80") {
$url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$url .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $url;
}
Get UrlRewritingNet to work with IIS 7.0
There is a well known problem using url rewriting functionality with UrlRewritingNet and IIS 7. The problem can be solved by setting the pipeline mode of the application pool to be in classic mode. Looking forward for the next version :).
Actually the url rewriting functionality can be achieved much easier with IIS 7.
Actually the url rewriting functionality can be achieved much easier with IIS 7.
AJAX: Timeout problem by asyncronous postback
The most common cause of this problem is the time of asyncronous response. It occur when the response takes more than 90 seconds. First of all be sure that there is no client script in the update panel. Use
ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "tmp", "<script type='text/javascript'></script>", False)
to register such scripts during loading page.
If the reason is long calculations on the srever you can change the asyncronous timeout in the ScriptManager tag.
<asp:ScriptManager ID="ScriptManager1" AsyncPostBackTimeOut="3600" runat="server" />
This makes the response to be valid an hour.
ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "tmp", "<script type='text/javascript'></script>", False)
to register such scripts during loading page.
If the reason is long calculations on the srever you can change the asyncronous timeout in the ScriptManager tag.
<asp:ScriptManager ID="ScriptManager1" AsyncPostBackTimeOut="3600" runat="server" />
This makes the response to be valid an hour.
How to sum values in Excel only from visible cells
There is a good article in microsoft support site for this problem and the example works fine.
How to use a VBA Macro to Sum Only Visible Cells
see also how to create user defined functions (UDF)
in Excel
How to use a VBA Macro to Sum Only Visible Cells
see also how to create user defined functions (UDF)
in Excel
Creating User Defined Function in Excel (UDF)
You have to use VBA for making User Defined Function in Excel (UDF).
Click on Developers tab in the ribbon (Excel 2007) then click on Visual Basic or use Alt+F11.
Then insert a new module by Insert->Module and write your function there.
The functions will be inlcuded Insert Function dialog box in "User Defined" category.
To use the functions in another excel documents you must save them in your own add-in by saving the file as add-in file .xla or .xlam for Excel 2007. Then load the add-in by Start->Excel Options->Add-ins->Go.
Click on Developers tab in the ribbon (Excel 2007) then click on Visual Basic or use Alt+F11.
Then insert a new module by Insert->Module and write your function there.
The functions will be inlcuded Insert Function dialog box in "User Defined" category.
To use the functions in another excel documents you must save them in your own add-in by saving the file as add-in file .xla or .xlam for Excel 2007. Then load the add-in by Start->Excel Options->Add-ins->Go.
How to enable VBA on Excel 2007 (Microsoft Office 2007)
The developer's functions of excel and VBA are disabled by default. They can be unlocked using Start->Excel Options window. Check "Show developers tab in the Ribbon" in Popular section. After clicking OK the developers tab is shown at the last place in the ribbon.
Another important thing is the saving xls documetns with recorded macros or inlcuded VBA scripts. You must save the file by Save As dialog box as an Excel Macro-Enabled Workbook with extension .xlsm .
Another important thing is the saving xls documetns with recorded macros or inlcuded VBA scripts. You must save the file by Save As dialog box as an Excel Macro-Enabled Workbook with extension .xlsm .
Error rendering a custom control
Maybe this is a little MS Visual Studio bug. It is connected to the control registering in the page in case of using a control defined in App_Code folder, not in another assembly. The exception thrown while opening design view of the page is:
Error Rendering Control - [control] An unhandled exception has occurred. There was an error parsing the theme. The assembly attribute cannot be an empty string.
So the VS environment doesn't recognize the control defined in the App_Code. Therefore the control regitration must inlcude the assembly name - "App_Code"
<%@ Register TagPrefix="my" Namespace="MyControls" assembly="App_Code" %>
or
<add tagPrefix="my" namespace="MyControls" assembly="App_Code" />
in web.config - pages/controls section
Error Rendering Control - [control] An unhandled exception has occurred. There was an error parsing the theme. The assembly attribute cannot be an empty string.
So the VS environment doesn't recognize the control defined in the App_Code. Therefore the control regitration must inlcude the assembly name - "App_Code"
<%@ Register TagPrefix="my" Namespace="MyControls" assembly="App_Code" %>
or
<add tagPrefix="my" namespace="MyControls" assembly="App_Code" />
in web.config - pages/controls section
Subscribe to:
Posts (Atom)