|
|
hi all i have created a website.i want to create setup of this site so that i can
install it on any pc and run it just by clicking its icon on desktop.
Can anybody guide me its urgent.....thanks....
|
|
|
|
|
|
can u plz tell me exact process....n also tell me that how will i run it on other computer as a set up...
|
|
|
|
|
Hi,
I have placed a usercontrol inside a .aspx page.
The usercontrol has a label control called label1.
Question:
In the webform.cs, how do I get the value of the label control in the usercontrol?
Thanks
|
|
|
|
|
You just use the following code
Dim str as String
str=ctype(usercontrolname.findcontrol("lable1"),lable).Text
|
|
|
|
|
Create a property in user control & access its value in .aspx page.
in User control,
public string TextValue
{
get{ return label1.Text; }
}
On .aspx page, you can get the label text as:
string labelText = Userconrol1.TextValue;
|
|
|
|
|
As Arun said,having public property is a better and maintainable approach.
Cheers!!
Brij
|
|
|
|
|
I do not seem to be able to access the usercontrol from the .aspx cs file.
Note that the usercontrol1 is inside a folder called usercontrols.
Any thoughts please?
Thanks
|
|
|
|
|
Did you register the user control on the aspx page?If not First register it on your aspx page.
else just go to design view of your aspx page and drag the usercontrol on your page it automatically register the control.Then you will be able to access the control from your aspx page.
Cheers!!
Brij
|
|
|
|
|
|
Cheers!!
Brij
|
|
|
|
|
I want to export textbox value into pdf file in asp.net
|
|
|
|
|
Dear Punit,
Try this may this help you.......
using CrystalDecisions.CrystalReports.Engine;
using System.IO;
public partial class rpt : System.Web.UI.Page
{
private ReportDocument BidEstimates;
protected void Page_Load(object sender, EventArgs e)
{
string RptPath = Server.MapPath("file.aspx");
BidEstimates = new ReportDocument();
BidEstimates.Load(RptPath);
//ExportFormatType.PortableDocFormat is Use For PDF documents......
BidEstimates.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "ExportedReport");
}
}
!- F - R - I - E - N - D - S -!
|
|
|
|
|
|
Hi All,
In my application user filter,serch items in the gridview but when he/she click the button then all item serched items he losed.
I want to disable back button.for this I m using following code
<script type="text/javascript">
function noBack(){window.history.forward()}
noBack();
window.onload=noBack;
window.onpageshow=function(evt){if(evt.persisted)noBack()}
window.onunload=function(){void(0)}
</script>
but it breaks for go to previous page but in this situation user is in same page.
thnks to all.........
|
|
|
|
|
As I think, the best way to disable the back button is "don't create the history of the page". Because may be in some browser's, disable code will not work.
Here is the code to remove the history of a particular page:-
<%
Response.Expires = 0
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1)
Response.AddHeader("cache-control", "private")
Response.CacheControl = "no-cache"
%>
Hope this will help you......
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
What part/tag of the .aspx page or (event handler) code behind does this code fits?
|
|
|
|
|
you can put this code on above the HTML tag of your .aspx page.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
|
Your welcome
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Thnks For Reply
I have used this code
but it is going to back......
in all browsers(IE,Mozila)
|
|
|
|
|
This code has to be used on previous page.
Means, if you want's to disable the "back" button of page "zxc.aspx", so you have to put this code in previous page of "zxc.aspx", from which you have come to "zxc.aspx". i.e. if you have come from "test.aspx" (on click of any link) to "zxc.aspx", then you have to put this code on "test.aspx" page.
Try this. This will definitely work in all browsers.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Thnks Dear,
In my application user is always in same page.because he is filtering,sorting and serching items in grid then grid is showing data according to filtering,sorting and serching but it open in same page always
not in other page......
Thnks....
|
|
|
|
|
i like to display report names in a data list and when the user clicks open the corresponding PDF file.
all the reports are in PDF format.
Report 1
Report 2
Report 3
Report 4
Report 5
how can i do this?
i am saving pdf files path in database(http://www.mysite.com/reports/Report1.pdf)
my current code shows the report name but when i click it doesn't go anywhere.
<br />
<asp:datalist id="DL1" runat="server" ItemStyle-BackColor="#c7c7c6" ItemStyle-BorderColor="#c7c7c6" CssClass="Titles"><br />
<ItemTemplate> <br />
<asp:HyperLink Runat ="server" NavigateUrl ='<%#DataBinder.Eval(Container.DataItem, "ReportURL")%>' ID="Hyperlink1"> <br />
<%#DataBinder.Eval(Container.DataItem, "ReportName")%> <br />
</asp:HyperLink> <br />
</ItemTemplate> <br />
</asp:datalist> <br />
code behind
<br />
Private Sub GetReports()<br />
<br />
Dim objConnection As SqlConnection = New _<br />
SqlConnection(ConfigurationManager.ConnectionStrings("MyDbConn").ToString())<br />
<br />
objConnection.Open()<br />
<br />
Dim myCommand As New System.Data.SqlClient.SqlCommand()<br />
myCommand.Connection = objConnection<br />
<br />
myCommand.CommandText = "SelectReports"<br />
myCommand.CommandType = CommandType.StoredProcedure<br />
<br />
<br />
Dim param As New System.Data.SqlClient.SqlParameter()<br />
<br />
Dim myAdapter As New SqlDataAdapter(myCommand)<br />
<br />
myAdapter.Fill(DataSetReports)<br />
<br />
<br />
Dim reader As SqlDataReader = myCommand.ExecuteReader()<br />
<br />
DL1.DataSource = DataSetReports<br />
<br />
DL1.DataBind()<br />
objConnection.Close()<br />
<br />
End Sub<br />
modified on Monday, January 25, 2010 1:21 AM
|
|
|
|