|
FreeTextBox[^] is a free WYSIWYG textbox control for ASP.NET. It does a lot more than just hyperlinks, but I doubt you're going to find a control that just does hyperlinks. You'd have to write one yourself using the DIV approach I mentioned earlier.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Dear All,
I am using asp.net 1.1 and crystal report 11.
when I want to use the report in my project..I must open the report in VS
Then I should verfiy report for login(user name ,password,database..)
by right click on report then database-set location
I want parameter login,database of report to be passed at runtime.???
also I have done this for
rpt.SetDatabaseLogon(userName,password,server,databse,true);
verfiy
but I must done the prevouse ,,,
Yes. CreatiVity withOuT limiTs
modified on Wednesday, April 9, 2008 4:03 PM
|
|
|
|
|
Imports System.Data
Imports System.Io
Imports System.Data.OleDb
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.CrystalReports.Engine.ReportDocument
Imports CrystalDecisions.Web
Partial Class Test_rpt
Inherits System.Web.UI.Page
Dim cn As New ConnectionInfo
Dim con As New OleDbConnection
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\Website1\App_Data\Database_Name.mdb;Persist Security Info=True"
Call showreport()
End Sub
Sub showreport()
With cn
.DatabaseName ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\Website1\App_Data\Database_Name.mdb;Persist Security Info=True"
or
.DatabaseName ="Database_Name.mdb"
End With
Dim rpt As New ReportDocument
rpt.Load(Server.MapPath("report_name.rpt"))
Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo()
Dim ParamField As New ParameterField
Dim ParamField_Value As New ParameterDiscreteValue
ParamField.Name = "prj"
ParamField_Value.Value = Session("prjnm")
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("prj").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
ParamField = New ParameterField
ParamField_Value = New ParameterDiscreteValue
ParamField.Name = "dt"
ParamField_Value.Value = Session("dt")
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("dt").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
ParamField = New ParameterField
ParamField_Value = New ParameterDiscreteValue
ParamField.Name = "sno"
ParamField_Value.Value = Session("maxsrno")
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("sno").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
Me.CrystalReportViewer1.ParameterFieldInfo = ParamFields
Me.CrystalReportViewer1.HasRefreshButton = False
Me.CrystalReportViewer1.HasPageNavigationButtons = False
Me.CrystalReportViewer1.HasGotoPageButton = False
Me.CrystalReportViewer1.HasToggleGroupTreeButton = False
For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo
cnInfo.ConnectionInfo = cn
Next
Dim ms As System.IO.MemoryStream
ms = CType(rpt.ExportToStream(ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
rpt.Close()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "Application/pdf"
Response.AppendHeader("Content-Disposition", "attachment; filename=" & Session("inno1") & ".PDF")
Response.Buffer = True
Response.BinaryWrite(ms.ToArray())
Response.End()
End Sub
End Class
|
|
|
|
|
Hi, thanks for looking
Im having a weird behavior and i dont know whats going on
I have the following code:
Dim panel As New Panel
Dim lbl As New Label
lbl.ID = "Label1"
lbl.Text = "Text"
panel.Controls.Add(lbl)
Dim lbl2 As Label = CType(panel.FindControl("Label1"), Label)
lbl2 is supposed to have lbl but it has Nothing
On the immediate window i get the following info:
?panel.Controls.Count
1
?panel.Controls(0)
{System.Web.UI.WebControls.Label}
System.Web.UI.WebControls.Label: {Text = "Text"}
AppRelativeTemplateSourceDirectory: "~/Test/"
BindingContainer: Nothing
ClientID: "Label1"
Controls: {System.Web.UI.ControlCollection}
EnableTheming: True
EnableViewState: True
ID: "Label1"
NamingContainer: Nothing
Page: Nothing
Parent: {System.Web.UI.WebControls.Panel}
Site: Nothing
SkinID: ""
TemplateControl: Nothing
TemplateSourceDirectory: "/V01/Test"
UniqueID: "Label1"
Visible: True
?panel.FindControl("Label1")
Nothing
How can i get the lbl control??
I cant just use index because i might have many controls inside the panel, i wont always know the order of the controls
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
Did you add the panel to the form control collection?
form1.controls.add(panel);
MrPlankton
|
|
|
|
|
Thanks for the reply
Adding the panel to the form solves the problem
I hadnt tought about it
If im inside a class, how can i add those panels to the form?
(In httpcontext.current. i dont see anything like page) I can only think of sending page as a parameter, but is that my only option?
If you know any other, please let me know
Im using this functions where i insert and read controls from panels and the normal flow is insert them, and show them on the client, then read the options set on the client and save those to db
In this case, where this is not working is now that im doing this directly (Not sending it to the client), im just inserting the controls, setting values im reading from DB and then reading them (Here is where im getting hte error)(This might seem dumb, but in the function where i read the values, som calculations are done and i would like to reuse thos function the way they are)
Alexei Rodriguez
|
|
|
|
|
Pass the controls collection.
MrPlankton
|
|
|
|
|
I'm trying to use headers property of httpwebrequest to send a cookie to a server. For diong so, ii'm using add method of httpwebrequest.headers.
I can add any header included cookies. But, the problem is the cookie is not recieved by the server.
How i know that is simple. I wrote one page on server that prints request headers and cooikes. when i use my code on this page the cookie is not there (as i said before any other headers will be shown in this page az request headers).
Please somebody help.
|
|
|
|
|
|
I think u misunderstood me. I want to send cookies from client to server. cookiecontainer is an object for response to put cookies in it. without it httpwebresponse can't send cookies back to client.
|
|
|
|
|
raha2002 wrote: I think u misunderstood me. I want to send cookies from client to server. cookiecontainer is an object for response to put cookies in it. without it httpwebresponse can't send cookies back to client.
How do you know that? Did you try it? I did and it works just fine.
HttpWebRequest req = WebRequest.Create("http://localhost/Research/RequestViewer.aspx") as HttpWebRequest;
Cookie cook = new Cookie();
cook.Name = "TestCookie";
cook.Value = "CookieValue";
cook.Domain = "localhost";
req.CookieContainer = new CookieContainer();
req.CookieContainer.Add(cook);
WebResponse res = req.GetResponse();
Stream s = res.GetResponseStream();
StreamReader sr = new StreamReader(s);
while (!sr.EndOfStream)
Console.WriteLine(sr.ReadLine());
led mike
|
|
|
|
|
I have 2 dropdownlists on a formview. The list of the second one (ddl_2) is depend on the selected value of the first one (ddl_1). I use a client callback function (GetDDL2List) on event OnChange to retrieve the list for the second one. After I selected for a value from the first one list of the second come out correctly. After I make a selection from the second one and submit (post back) the form, however, the selection of the second one is lost.
<asp:DropDownList ID="ddl_1" Runat="server" DataSourceID="ods_1" DataValueField="cde_item" DataTextField="txt_item" OnDataBound="ddl_1_DataBound" onchange="GetDDL2List(this.value, 'ddl'); " />
<asp:ObjectDataSource ID="ods_1" Runat="server" TypeName="Proj1.Test" SelectMethod="GetList1"
</asp:ObjectDataSource>
<asp:DropDownList ID="ddl_2" Runat="server" DataSourceID="ods_2" DataValueField="cde_tem" DataTextField="txt_item" OnDataBound="ddl_2_DataBound" />
<asp:ObjectDataSource ID="ods_2" Runat="server" TypeName="Proj1.Test" SelectMethod="GetList2"
<SelectParameters>
<asp:ControlParameter Name="sGroup" ControlID="ddl_1" DefaultValue="-1" Type="string" />
</SelectParameters>
</asp:ObjectDataSource>
|
|
|
|
|
Verify that when you bind your DropDownLists that you are only doing it if !Page.IsPostBack
|
|
|
|
|
Thanks for your response. I use two-way databinding and I can not stop the databind.
|
|
|
|
|
I have a Search Page which contains dates and text fields. When I leave the Date fields blank an error is thrown in my code stating that cannot "Conversion from String to type Date is not valid".
This happens because I am trying to assign the empty Date Text field to A Variable of type Date. If the Date Text field contains a Date there is no error thrown.
Dim dtDateFrom As Date
Dim dtDateTo As Date
dtDateFrom = tbxDtFrom.Text
dtDateTo = tbxDtTo.Text
Anyone any ideas why this is happening
macca
|
|
|
|
|
When the user does not enter a value, retrieving the Text property returns an empty string. You are attempting to perform an implicit conversion of "" to a date, which is not possible. You'll need to guard against this by testing to ensure that there is a value in the textbox before converting, or by using DateTime.TryParse .
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
first check
txt1 means the textbox having Date Value.
if txt1.text="" then
in query pass null keyword for that Date Field.
i.e. here abc is the table with 2 columns frmdt(Date)& name(Text)
insert into abc values(null,'"& txt2.text &"')
|
|
|
|
|
hai,
i have one problem ,i want to give data at runtime in web application,but i want to give input in table format like as gride view .
minimum 10*10 empty rows and coloumns to display.
yours ,
vishnu vardhan.menta
|
|
|
|
|
you can use array of controls and generate the controls dynamically..
you can even fix minimum number of rows to be generated everytime i.e. 10 in this case.
on SAVE, just calculate the number of elements in array and LOOP through the elements and FIND CONTROL, detect value and fire save query...
OR add the values into a datatable and perform save operation with COMMANDBUILDER
its simple answer
Ashish Sehajpal
|
|
|
|
|
Why not use a grid view. Or a repeater...
|
|
|
|
|
|
John Sundar wrote: the record is to store in a log file (.txt).
how to implement.?
Try Googling log4net
led mike
|
|
|
|
|
My project runs very fine in local machine with local Mysql
but when is forced to connect with remote Mysql it shows
"Unable to connect to any of the specified MySQL hosts."
Can any body know how to solve this.
my connection string is:
connectionString="server=XXXX.secureserver.net;user id=myuserid;password=mypwd;persist security info=false;database=SampleDB;pooling=false;"
providerName="MySql.Data.MySqlClient"
Thnx
regards
Prabu
|
|
|
|
|
is it set up to allow remote connections?
Do you need to use differnet login credentials for remote access?
check this out
|
|
|
|
|
can u able to explain me in short about the configuration settings & conection string required for remote mysql connection with asp.net
|
|
|
|