|
Hi,
I would like to open a crystal report in a new window by passing two query strings. The code i am using as of now is as follows,
protected void btnShowReport_Click(object sender, EventArgs e)
{
..
..
..
..
Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
}
Could anyone help me on this above issue.
Many thanks in advance.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Hari_1010 wrote: Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
This won't open in a new window. Try the following one
string url = "ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format;
ClientScript.RegisterClientScriptBlock(this.GetType(),"NewWindow",
string.Format("window.open (\"{0}\",\"mywindow\")",url),true);
|
|
|
|
|
Hi Navaneeth,
Thanks a lot for your kindly help. It's working fine now.
Regards,
Hariharan C
|
|
|
|
|
Hi,
I've 2 aspx pages. I have to transfer a control value from one page to other page by using server.transfer. In First.aspx page, I have one hidden field and I am setting a value into it. I have followed the following things in my 2 pages.
First.aspx
----
Server.Transfer("Second.aspx",True)
Second.aspx
------------
]]>;
strUName = Request.Form("HiddenField1")
But I did not get hidden field value into strUName. Pls help.
Balasubramanian K.
|
|
|
|
|
Make the hidden field run at server. In the second page, use "PreviousPage" property and find the control. Something like
TextBox text = this.PreviousPage.FindControl("TextBox1") as TextBox;
if (text != null)
Replace the texbox name with a valid one.
|
|
|
|
|
thanks. I got it..
Balasubramanian K.
|
|
|
|
|
i want to toggle treeview control on clicking root but not by clicking +/- images. i want to hide +/- images at all. can any body help please
|
|
|
|
|
Look at how tree view emits JS to toggle the visibility. Use the same and register it on the node's click.
|
|
|
|
|
javascript:TreeView_ToggleNode(TreeView1_Data,0,TreeView1n0,' ',TreeView1n0Nodes)
this is the javascript that is needed to do the job but how to fire this for each root node, i mean to say for each root node (hover node) i have to pass parameters and how to call this function differently for different hover nodes.
|
|
|
|
|
i did it by using SelectAction="Expand" attribute of treenode in tree view control but i could not remove +/- image which i want to remove. if i am removing it using ShowExpandCollapse="false" then root does not toggle. can u help please.
|
|
|
|
|
I am sorry, my last reply was wrong. Here is how you do that.
1 - Goto tree view properties, choose "Nodes".
2 - Choose one node, and in the properties, make "SelectAction" to "Expand".
You are done.
|
|
|
|
|
Hi, I have the complex business object like: Ownership. Ownership object is collection of buisness objects, collection of person objects.
class Ownership
{
Collection<BusinessData> Businesses;
Collection<PersonData> Persons;
}
In the ASPX.cs Page_Load I am adding the business objects to Ownership object:
OwnerShip owners = new OwnerShip();
owners.Businesses.Add(new BusinessData("XX LLC", true, 0, 20, "pres", "", true)); XX LLC is business name.
owners.Businesses.Add(new BusinessData("YY LLP", false, 0, 20, "vice president", "", true));
In ASPx page it is like this:
<asp:GridView ID="gvOwners" runat="server" AutoGenerateColumns="False" Width="787px"
OnRowDataBound="gvOwners_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:DataList ID="BusinessPersonDataList" runat="server">
<ItemTemplate>
<%# ((BusinessDescriptionData)Container.DataItem).BusinessName %>
</ItemTemplate>
</asp:DataList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Now in the RowDatabound event of GridView, I want to bind one DataList with Business colection.(in another DataList I want to bind the Persons collection, I did not put the code for this part yet. First I am trying with the Busienss objects).
The RowDataBound event is like trhe below:
protected void gvOwners_RowDataBound(object sender, GridViewRowEventArgs e)
{
OwnerShip os = null;
GridViewRow r = e.Row;
if (r.DataItem != null) // Make sure we're not in the Header or Footer row
{
os = r.DataItem as OwnerShip;
}
DataList BPDataList = e.Row.FindControl("BusinessPersonDataList") as DataList;
if (BPDataList != null && os != null)
{
BPDataList.DataSource = os.Businesses;
BPDataList.DataBind();
}
}
When I run the page, I am not getting any results. The Gridview is not displaying anything. If I remove the RowDatabound event and in the page_load gvOwners.DataSource = owners.Businesses; I have not used the datalist in this example, just binded to one Label in Gridview. Then it is displaying the results.
I think the RowDatabound event is not firing. What is the problem in the above?
Thanks in advance.
|
|
|
|
|
You need to put break points and step into the code to know what's going wrong.
|
|
|
|
|
Hi,
Does anyone know how set the dropdown width of a HTML Select control in IE??
I want to have the dropdown width wider than the control.
It works ok in FireFox, Bill.
Malcolm
|
|
|
|
|
|
HOo does that affect the DROPDOWN WIDTH?
|
|
|
|
|
Can you post the your html code ?
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... "
Check My Blog
|
|
|
|
|
<select id="Select1" style="width:120px;">
<option>options 1 </option>
<option>options 1 </option>
<option>options 1 </option>
<option>options 1 </option>
</select>
Check this one.
Give width in pixels its working in my machine.
Any issue with this ?
if then also you have any issue
do one thing for default selected option give space in it
<option> Select One </option>
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... "
Check My Blog
|
|
|
|
|
You do not understand
I want to set the width of the list that drops down seperately
from the width of the control
So it displays all text
|
|
|
|
|
Still not understing the issue
Do you mean that drop down is having some options whose text is more than the width of control ? beacuse of it user can't see the whole text of the list ?
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... "
Check My Blog
|
|
|
|
|
|
Hi all
I have an user control where I use Slider Extender from asp.net ajax control toolkit. This Control is loaded into update panel in the aspx page. When I drag the slider sometimes I get an error "htmlfile: Unspecified error" in ScriptResource.axd. This error occurs on the line
var clientRects = element.getClientRects();
This error is not repeatative too. Sometimes this error occurs. Has anyone come across this issue ? how can I resolve this? thanks in advance
|
|
|
|
|
I'm having trouble making a module for my app in which I am in an initial page, page1, which gives me the option to search for orders from a certain provider.
I select my provider in page1 and have a link, Search..., that opens a new page or window with orders from a that provider that I have selected in page1, displaying the orders on a gridview.
Afterwords I select the orders from this gridview that I wish to view and only return the ORDER_ID from those I have selected to my initial page, page1.
How can I do this?
VisualStudio 2005, visual basic, asp.net 2.0
|
|
|
|
|
If the information you are passing is not sensitive, pass it through query string. Pass the provider selected through query string to next page. When user selects orders, again supply that values to page1.
|
|
|
|
|
I have User Control ucParent, inside which I have User Control ucChild. I am trying to refer to the ucChild from ucParent, but I am not able to ? Any hints, ideas ?
BTW, if I have ucChild in an aspx page, I am able to refer it.
Thanks in advance !
|
|
|
|