|
The links point to the wrong URL. Check what url is in the browser address bar when you get these errors.
|
|
|
|
|
Thank you for your reply.
This error also occurs even while changing selection in drop down box.The same link works fine in Visual Studio 2003/asp.net 1.1 enviornment.
Bharat Gadhia
|
|
|
|
|
I have code that calls a report (report service 2005) that I have to put into a web service and then stream to a client app (vb - asp.net). The code that runs the report, gets and displays the report fine if I place it on a regular aspx page but I can't figure out how to put it in a web service and stream it to a client for consumption.
The following code will display the report:
Response.ClearContent()
Response.AppendHeader("content-length", result.Length.ToString())
Response.ContentType = "application/PDF"
Response.BinaryWrite(result)
Response.Flush()
Response.Close()
and this will write it to a file:
Dim stream As System.IO.FileStream = System.IO.File.OpenWrite(fileName)
stream.Write(result, 0, result.Length)
But how to I do this as a web method?????
Full code is below:
---------------------------------------------------------------------------
Imports System.IO
Imports System.Web
Imports System.Net
Imports System.Web.Services
Imports System.Web.Services.Protocols
<webservice(namespace:="ggmitg.servicesbus")> _
<webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
Public Class ServicesBus
Inherits System.Web.Services.WebService
<webmethod()> _
Public Function GetReport() As String
Dim rs As RptSrv2005.ReportingService2005
Dim rsExec As RptExec2005.ReportExecutionService
'create new proxy to the web service
rs = New RptSrv2005.ReportingService2005()
rsExec = New RptExec2005.ReportExecutionService()
'authenticate to the web service using windows credentials
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials
'assign the url of the web service
rs.Url = "http://192.168.248.12/ReportServer/ReportService2005.asmx"
rsExec.Url = "http://192.168.248.12/ReportServer/ReportExecution2005.asmx"
'prepare render arguments
Dim result As Byte() = Nothing
'Dim reportPath As String = "/AP Recovery Audits Reports/VendorsStatus "
Dim format As String = "PDF"
Dim historyID As String = Nothing
Dim devInfo As String = "<deviceinfo><toolbar>False"
Dim extension As String = Nothing
Dim encoding As String = Nothing
Dim mimeType As String = Nothing
Dim warnings As RptExec2005.Warning() = Nothing
Dim streamIDs As String() = Nothing
'define variables needed for GetParameters() method
Dim reportName As String = "/AP Recovery Audits Reports/VendorsStatus"
Dim forRendering As Boolean = False
Dim values As RptSrv2005.ParameterValue() = Nothing
Dim credentials As RptSrv2005.DataSourceCredentials() = Nothing
Dim parameters As RptSrv2005.ReportParameter() = Nothing
'other parameters
'Dim fileName As String = "c:\testreport.pdf"
'Dim fileName As String = "c:\test.data" 'file to hold binary data
Try
'see if any parameters are needed
parameters = rs.GetReportParameters(reportName, historyID, forRendering, values, credentials)
'load selected report
Dim execInfo As New RptExec2005.ExecutionInfo
execInfo = rsExec.LoadReport(reportName, historyID)
'set the parameters needed for the report.
Dim params(0) As RptExec2005.ParameterValue ' = New RptExec2005.ParameterValue
params(0) = New RptExec2005.ParameterValue
params(0).Name = parameters(0).Name
params(0).Value = "140"
rsExec.SetExecutionParameters(params, "en-us")
result = rsExec.Render(format, devInfo, extension, encoding, mimeType, warnings, streamIDs)
'output the file
'Response.ClearContent()
'Response.AppendHeader("content-length", result.Length.ToString())
'Response.ContentType = "application/PDF"
'Response.BinaryWrite(result)
'Response.Flush()
'Response.Close()
'create a file stream and write the report to it
'Dim stream As System.IO.FileStream = System.IO.File.OpenWrite(fileName)
'stream.Write(result, 0, result.Length)
???????????????????
How do I stream output to a consumer app
???????????????????
Catch ex As Exception
'Response.Write(ex.Message)
End Try
'Return "Hello World"
End Function
End Class
|
|
|
|
|
Hello, I'm new to ASP.NET. I 've ben a C# programmer for about a year, but I'm just touching on the realms of web development.
Anyhow... I'm having a problem. Everytime I try to compile and run my page, I get the following message: "CS0117: 'ASP.index_aspx' does not contain a definition for 'MyScript'"
This is the code on my page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language="C#" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
<link rel="stylesheet" type="text/css" href="default.css" />
<script type="text/c#" id="MyScript">
private void MyFunc(object sender, EventArgs e)
{
TextBox1.Text = "Test";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button runat="server" Text="Button" id="Button1" onClick="MyScript.MyFunc()"/>
<asp:TextBox runat="server" id="TextBox1" MaxLength="10" Rows="1" Columns="10"/>
</form>
</body>
</html>
If it helps any, I'm using Microsoft Expression Web, because I don't have anything else other than C# Express (No asp.net support)
I'd appreciate any help.
|
|
|
|
|
You need to add the runat=server attribute to your script tag
<runat="server"</b>>>
It is a better implementation to use a code behind file, htough I'm not usre if Expressions supports this. Why not use Visual Web Developer Express Edition?
<div class="ForumSig"><hr>only two letters away from being an asset</div>
|
|
|
|
|
Ha ha, thanks. I feel dumb.
And, Expressions "allows" codebehind, but doesn't "support" it. Now that I know there's a Visual Web Developer Express... I'm off to go find it!
|
|
|
|
|
I'd like to know if it is possible to not allow Shift Click to open in a new browser window. This is IE6.x I'm wondering about.
I haven't even begun to think IE 7.x yet.
Do social engineers have quality assurance?
|
|
|
|
|
Dear All
I have a datagrid in a page, i wrote a code to take a value from this datagrid and then send it to another page to open in a popup window and below is the code.
=====================The code=====================
window.showModalDialog("TradesForReuterCode.aspx?ReuterCode=" + RouterCode + "", 'static' , "status=2,scrollbars=1,left=(screen.width-width)/2,top=(screen.height-height)/2,width=420,height=600");
===================================================
the another popup page opened normally, but the problem is when i try to colse the popup window my parent page make postback and i don't want this, i try a solution to make a button and write another code to close the popup window and below is the code
===================================================
function CloseMe()
{
self.close();
window.opener.location.reload(false);
}
=====================================
But still have the same problem
plz if anyone face this problem before try to help me and thank you in advance
|
|
|
|
|
Hi,
I have the master page inside I am writing like this:
<asp:textbox id="txtStartDate" runat="server">
and in Popup.aspx:
<asp:calendar id="calDate" onselectionchanged="Change_Date" runat="server">
Page_Load
control.Value = Request.QueryString["textbox"].ToString();
Change_Date(...) event for the calendar
string strScript = "window.opener.document.forms(0)." + control.Value + ".value = '";
strScript += calDate.SelectedDate.ToString("MM/dd/yyyy");
strScript += "';self.close()";
strScript += "</" + "script>";
RegisterClientScriptBlock("anything",strScript);
But it is not working Without master page the code is working fine.
Please any one provide me the code for this.
Thanks in advance
|
|
|
|
|
I have a .DLL in my Project/App_code folder, it works without adding any import statements to my .aspx programs on local machine. But when I upload my web app, it says my DLL don't exist. What can I do, can anyone help me, I appreciate it.
|
|
|
|
|
the DLL is both in my project's /bin and /app_code directory and I receive this message.
Compiler Error Message: CS0103: The name 'Sel' does not exist in the current context.
|
|
|
|
|
I solved it, but was wondering If I can change the location of the DLLs, perhaps more local. I had to go up to the root and place my bin folder there. Can I put it in my project folder somehow?
|
|
|
|
|
Assuming this an assembly from another project, or third party, you need to add a reference to it in your application. That's all it should take.
only two letters away from being an asset
|
|
|
|
|
Hi,
In my Webapp. i want the user to type in some fields (textboxes) press the add button.
Then directly is has to be seen in gridview, datalist,...
At the same time the textboxes are made empty and i can type in new things in those textboxes,
press the add button again --> clear textbox, add new line at grid...
How do i have to start,...
Is there maybe a better way to display something like this,...
Thanks
A
|
|
|
|
|
You spelled it out rather clearly, what are you having a problem with?
|
|
|
|
|
Thats a pretty trivial requirement, what problems are you having with it?
|
|
|
|
|
I would like to have something like this!
but how should i begin, can anyone put me in the right direction...
|
|
|
|
|
Check out the data tutorials on www.asp.net, they're a great place to start and will show you how to do what you want.
|
|
|
|
|
Am new .vb.net, but i made it to the end, i understand part. in vb6 the Package and Deployment Wizard did everything for you, package and make setup files and there you go it can be setup. i know here you supposed to install .Net framework in the system that you going to install the Application. but cant you include the .Net in your Application to be installed automatically if its not installed? , cant it install SQlclient if its not installed,. mybe i have read wrong Articles. i have googled the Deployment, but most words being mentioned are "Deplayment is Simpler in Visual Studio.Net than in the Ealier version". i dont bealive until i experince that. Please help me with Deployment or point to a Step by Step Article that Best Explain the Deployment. am using VS2003
Thanks
Vuyiswa
|
|
|
|
|
I don't have it in front of me, so i can't tell you for certain, but I do believe there was a way to install the .NET Framework with your app.
I'm not sure on SQLClient....never used it.
If nothing else, Microsoft's site has a guide on how to deploy the .NET Framework.
Sorry I can't post a link, hope it helps anyhow.
------------------------
using System.People;
Person me = new Person();
me.Certifications = null;
me.Experience = little;
me.WantsToLearn = true;
me.InSchool = true;
me.AskQuestions("C# .NET 2003");
|
|
|
|
|
|
Hi All,
I want to display some data in tree format.
I must be able to populate this tree using a dataset from a Select statement.
The child nodes must have checkbox against each other. This must be checked on/off depending upon the Boolean value in the table.
After populating the tree, when the user checks/uncheck the checkbox in the child nodes, it must update the table.
Can anybody suggest some way to do this? Is there any asp control to do this effectively?
Thanks
|
|
|
|
|
I suggest using a repeater. You'll need two dataTables in your dataset parent and child. In the repeater you can use Div tags or HTML Tables to get the display you want. Then use a CheckBoxList in the item template. Use the repeaters OnItemDataBound event to populate your check box list.
|
|
|
|
|
Hi everybody
I'm using two updatepanel and two updatepanelanimation for eachone. When i triggered one panel, both updatepanelanimations play. But i want only one plays when i triggered. I didn't find solution. Can anyone help?
|
|
|
|
|