|
I made a simple report CrystalReport1.rpt which was added to my project
Now I want to use this report in my project:
CrystalReport1 = new CrystalReport1();
But I get this compile-error:
The type or namespace name 'CrystalReport1' could not be found (are you missing a using directive or an assembly reference?)
What is wrong?
|
|
|
|
|
What has this got to do with ASP.NET?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i have exported file to Excel......nw i need to retrieve the same excel file to my asp.net application
My excel file is like the given below :-
AssetID Description AssetTag
1246 hello me(1246) 10103001245
1247 hi me(1247) 10103001246
when am trying to import, am getting an error like " External table is not in the expected format "
wht might be the prblm.....
can anyone help me?
|
|
|
|
|
add this code
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "attachment;filename=DCNReport.xls");
Response.Charset = "";
this.EnableViewState = false;
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
This is for while exporting the file.....
my code is like ths:-
Dim excelname As String = FileUpload1.PostedFile.FileName
Dim intFileNameLength As Integer = InStr(1, StrReverse(excelname), "\")
strFileName = Mid(excelname, (Len(excelname) - intFileNameLength) + 2)
Dim namewe As String = System.IO.Path.GetFileNameWithoutExtension(strFileName)
Dim sWorkbook As String = namewe + "$"
FileUpload1.PostedFile.SaveAs(Server.MapPath("ImportFiles/") + namewe + ".xls")
Dim oledbconn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("ImportFiles/") + namewe + ".xls ;Extended Properties=Excel 8.0;")
Comm.CommandText = "SELECT AssetID,Description,AssetTag FROM [" & sWorkbook & "]"
Comm.CommandType = Data.CommandType.Text
Comm.Connection = oledbconn
oledbadap.SelectCommand = Comm
oledbadap.Fill(oledbdatatbl)
GrdImpScanner.DataSource = oledbdatatbl.DefaultView
GrdImpScanner.DataBind()
am getting the error in this line :-
" oledbadap.Fill(oledbdatatbl) "
|
|
|
|
|
im trying to use the update panel but it updates the entire page as supposed to the update panel. i cant find what i have done wrong. can anyone help???
Many thanks in advance
====================================================================================
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:Label id="Label1" runat="server" Text="panel Created"></asp:Label>
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="Button1"></asp:AsyncPostBackTrigger>
</triggers>
</asp:UpdatePanel>
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
</body>
</html>
===========================code behind================
Protected Sub Button1_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "Refreshed at " & _
DateTime.Now.ToString()
End Sub
|
|
|
|
|
you can always try another method in using updatepanel.
example :
aspajax:updatepanel id="upGetContract" updatemode="conditional" runat="server"
contenttemplate
contenttemplate
triggers
aspajax:asyncpostbacktrigger controlid="btnSearch" eventname="Click"
triggers
aspajax:updatepanel
hope it help
nb : i dont know why if i give "<" or ">" the code will not be shown...
but i believe u got what i mean
|
|
|
|
|
Hi,
Our website provide users with a forum where they can enter messages. So, typically, a user would enter a message, click submit, and their message would be displayed on the forum.
The db that stores these msgs uses a varchar field. Now, we're adding a facility to convert any urls that are entered to links by adding 'a href' tags, so that when users see messages with urls, those urls appear as links, and they can click on them. The problem is that if a user enters a message of 8K chars, then we add 'a href' tags to any urls they have, that makes the message length > 8K, preventing us from storing it in our db. (Please note that we do need to add HTML tags for other reasons as well, not just to convert urls to links.)
We thought about adding 'a href' tags during pre-render, thus avoiding storing html in the db, but found that doing such string manipulations, while a user is waiting to see their post displayed on the forum, was expensive. Timing tests revealed that the time to render such pages more than doubled.
I have solved such problems previously by adding an extra field in the db to store any overflow data, that is, data that appears after the first 8K chars.
However, I learnt of sql server 2005's varchar(max) datatype, and 'am wondering if the best way to solve this problem would be to replace the varchar field with varchar(max).
Thanks in advance for any advice.
Shefali
|
|
|
|
|
Either use nvarchar(max) or ntext
only two letters away from being an asset
|
|
|
|
|
I have a form with 2 fields, say "name" and "tel" of a person.
My visitors may need to add from 1 to n persons
I need to display only fields for 1 record and a button that adds omre records' fields on the runtime as visitors' needs
I can use javascript code to create html form fields on the fly
Is there any better idea using ASP.NET powerfull controls?
Mohamed Gouda
Egypt
|
|
|
|
|
Hi there. You are probably best off using javascript as it will give your visitors the best experience in their browsers.
You could do it server-side by dynamically adding the text box controls in your Page_Load - something like Placeholder1.Controls.Add(tb) but as a user, I'd prefer the javascript route to avoid the server postbacks.
|
|
|
|
|
You could use a GridView, adding an empty record each time the user clicks the Add button. Of course the new row would need to be in edit mode. Unless you use an AjaxPanel this will produce postback flashing of course.
only two letters away from being an asset
|
|
|
|
|
Another way is create a user control having the fields that you want to add after clicking (2 text boxex)
Now add a repeater to your page bind this user control to repeater
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... "
|
|
|
|
|
hello
I develop a tool that display some charts,i used a charts control ,and a webchart.dll was added to my project ,when i run the project from visual studio i can see all the charts and the project is working well!
i also added the project to sharepoint web part.
the problem is when i viewing the site from another computer
this is the error i get
btw i develop before some webparts , this is the first time im using outside control...
HELP ME!!!
Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2770052
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'WebChart, Version=1.1.1.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32
|
|
|
|
|
Hi everyone,
I am developing an asp.net webpage where i would like the user to play a game.
The game is moving a car for every time tick.
I got the timer function and made the movement in javascript.
Now my problem is that how to call the javascript function from my timer which i have in asp ajax.
Love to hear any advise.
Thanking you
|
|
|
|
|
I think you need to reverse your logic. The timer should be in the JavaScript, and it should make out of band calls to your page class, rather than you page class trying to communicate with the JavaScript.
only two letters away from being an asset
|
|
|
|
|
Hi Developers
I want my customers to chooose from different templates for there Ad page like: http://www.onestopmotors.com/ad_details.aspx?ad_id=7365[^].
Please let me know what is the best way to implement this concept(having multiple skins)? I know there are skin files in ASP.net 2.0 but I have to use ASP.net 1.1.
Thanks for your time
modified on Monday, January 28, 2008 12:28:18 PM
|
|
|
|
|
As you are using .Net 1.1, and don't have the option of theming, the easiest way would be to have multiple stylesheets, and use the QueryString variable to determine which stylesheet to link to.
In the <head> section of your aspx page, add a standard link element that links to your default CSS file. Give it an ID and mark it to runat="server" . In your code-behind file, make sure the link element is declared as type System.Web.UI.HtmlControls.HtmlLink along with the other page controls.
Then, when the page loads you can simply check the QueryString to see which stylesheet to use. If you have a valid stylesheet then simply set your declared link elements href property.
Hope this helps...
Clean code is the key to happiness.
|
|
|
|
|
I have a web application which connects to SQL Database to bring the data
I have set impersonation to true in the web config <identity impersonate="true" />
I have Integrated Security = SSPI in my connection string
I have set authentication mode= windows
I have set my IIS to use Integrated Windows Authentication.
Anonymous access turned off.
Am able to run it on server and it works fine. But when I try accessing from client machine,
Login Failed for user 'NT Authority\Anonymous LOGON' error.
Any idea? Please help.
Thanks
|
|
|
|
|
I have a gridview that is in a webpart, , one column is a checkbox column.
in the grid_row created event I set the proberties for the check box like so:
private void Grid_RowCreated(object sender, GridViewRowEventArgs args)<br />
{ TableCell cell;<br />
CheckBoxField column;<br />
CheckBox checkBox;<br />
if (args.Row.RowType == DataControlRowType.DataRow)<br />
{ for (int i = 0; i < args.Row.Cells.Count; i++)<br />
{ cell = args.Row.Cells[i];<br />
column = Grid.Columns[i] as CheckBoxField;<br />
<br />
if (column != null)<br />
{ foreach (System.Web.UI.Control ctl in cell.Controls)<br />
{ checkBox = ctl as CheckBox;<br />
if (checkBox != null)<br />
{ CaseCategory dataObj = args.Row.DataItem as CaseCategory;<br />
if (dataObj != null)<br />
{<br />
checkBox.ID = dataObj.CategoryId.ToString(System.Globalization.CultureInfo.InvariantCulture);<br />
}<br />
checkBox.AutoPostBack = true;<br />
checkBox.EnableViewState = true;<br />
checkBox.CheckedChanged +=new EventHandler(checkBox_CheckedChanged);<br />
checkBox.Enabled = true; <br />
} } } } } }
before converting this code worked perfectly, after the event does not get fired. I have removed the scriptmanager and related controls from the page, with no effect.
does anyone have any ideas what is going wrong, or how to fix it?
|
|
|
|
|
hi,
i installed visual studio .Net 2005.how i can work on the visual web developer ? and how i can open the ASP.NET Web application template?
when i click on new->web site then there are five templates show which are as ASP.NET Web Site,ASP.NET Service,Personal Web Site Starter Kit,Empty Web Site,ASP.NET CrystalReports Web Site.but there is no ASP.NET Web Application template how i can get it
|
|
|
|
|
|
thanks
I AM WORKING ON "PLOTTER ROBOT"(FYP).
|
|
|
|
|
Pls can anybody help me out on previewing image to be uploaded with
Fileupload. I have a javascript that loads the image in an image control
when fileupload is clicked, It works on IE 6 but on IE 7 the image is
not displayed
|
|
|
|
|
Hi,
Can you please post the code section that does not appear to be working, or give us an idea of how you are handling the image preview.
Thanx...
Clean code is the key to happiness.
|
|
|
|