I got a javascript underfine error when I use the wcf service call. I found out that it will work after I remove or comment the extendedProtectionPolicy from the web configuration.
ASP.NET,VB.NET, C#, AJAX, SQL SERVER, SSIS Tips and Tricks
I got a javascript underfine error when I use the wcf service call. I found out that it will work after I remove or comment the extendedProtectionPolicy from the web configuration.
If you want to add versioning information to the assemblies generated for a precompiled Web site, you can do the following:
Aspnet_merge.exe can version the assemblies it creates by either copying the attributes from the App_Code assembly or copying them from a specific assembly specified using the –copyattrs option. This is therefore treated like any other assembly attribute. These options for specifying an attribute for the merged assembly or assemblies ensures that you can define all version attributes, including the file version, the assembly version, and any other assembly attributes you require.
Figure 25 shows the merge command used to apply attributes from the App_Code assembly, using the Web site shown in Figure 1. The AssemblyInfo.cs file shown in Figure 22 has been added to the Web site's App_Code folder.
Example
Aspnet_merge c:\precompileWebsite –copyattrs –a
Put the following HTML code inside of your page header in HTML source,
1 | <head> | |
2 | <title>My Page</title> | |
3 | <base | |
4 | </head> | |
The modal dialog will be able to successfully postback to itself
You can't add two identical events to the same Html control. For example, if you have a button with an onclick event, and you add another onclick at the server, the second event will overwrite the first. This becomes a problem if you need to add an event to some variable control, but you don't know what events that control already has. However, .Net provides a way to handle this.
We can:
The following code snippets this. This first block shows a simple JavaScript (with a parameter) being called by a button's onclick event.
function DoStuff1(var1) { ... <INPUT id="Button1" onclick="DoStuff1('Hello1')" type="button" value="Button" name="Button1" runat="server"> ... |
This snippet shows the server code to check if an onclick event already exists, and add a new wrapper if needed. Note that it persists the onclick values in viewstate to ensure that the wrapper function doesn't wrap itself upon postback. For example, if the first onclick event called DoStuff1(), and we wanted to dynamically add a new onclick function DoStuff2(), we could create a wrapper function Wrapper1() that called both functions, and was called from the onclick. Wrapper1() becomes the new value of the button's onclick.
private void Page_Load(object sender, System.EventArgs e) |
While this approach is tedious, it lets you dynamically add an event to a control without overwriting that control's existing event. This is useful when making your own custom controls that integrate with existing Html controls already on the page.
1st parameter = #prompt('param1')#
2nd parameter = #prompt('param2')#
Multiple select value prompt ID = Preprocessing_ID1
Textbox prompt ID = Postprocessing_ID1
<script>
// IBM Cognos 8.3 specific
function assignParamValue()
{
// get the reference to the Cognos form
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() :
document.forms["formWarpRequest"]);
var i, tmp;
tmp = "";
// get the handle for the 1st checkbox prompt - add div around them to distinguish
var prompt1 = document.getElementById('checkboxPrompt1');
// find all the children of the div of type checkboxes.
for (i=0; i < prompt1.childNodes.length; i++)
{
var node_list = prompt1.getElementsByTagName('input');
for (var i = 0; i < node_list.length; i++)
{
var node = node_list[i];
if (node.getAttribute('type') == 'checkbox')
{
if (node.checked)
{
if( tmp == "" )
{
tmp = node.value;
}
else
{
tmp = tmp + "," + node.value;
}
}
}
}
}
fW._textEditBoxPostprocessing_ID.value = tmp;
canSubmitPrompt();
promptButtonFinish();
}
</script>
<div id="checkboxPrompt1">
and add an HTML item right after the checkbox prompt with the contents of
</div>
<input type="BUTTON" class="clsPromptButton" onClick="assignParamValue()"
value="Finish">
If you are a software developer then you probably already know that Microsoft Windows and web browsers such as Internet Explorer and Mozilla Firefox use a technology called Authenticode to verify the publisher of downloads and check that they have not been infected by a virus since they were created. If your software is not signed with a digital certificate, users will receive a warning that the publisher could not be verified and asked whether they want to continue running it. Many users will decide to play safe and click "Don't run", costing you lost sales.
To create an assembly-information file for your website
[assembly:System.Reflection.AssemblyVersionAttribute("versionNumber")]
| |
| Do not place the assembly-information file in the App_Code directory. If you place the assembly-information file in the App_Code directory, it will be compiled automatically by the ASP.NET runtime and might cause compilation errors later in the compilation process. |
To specify the assembly-information file in your .aspx page
CompilerOptions="path\AssemblyInfo.cs"
Replace the path parameter with the physical path to the assembly-information file on disk.
If the path to your assembly-information file contains spaces, you must enclose the path and file name in single quotation marks (').
CompilerOptions='"path with spaces\AssemblyInfo.cs"'
Replace the path with spaces parameter with the physical path to the assembly-information file on disk.
To specify the assembly-information file in your Web.config file
type="Microsoft.CSharp.CSharpCodeProvider, System,
Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" warningLevel="1"
compilerOptions="path\AssemblyInfo.cs" />