|
Hi All ,
can any pls tell me How do i Open PDF files Directly by ASP.net Page.
that pdf file hyperlinklink has been given to my ASP.net page but it is asking for Download when click on link but i don't want that it should display automatically. please tell me...
|
|
|
|
|
Do you have Acrobat Reader installed on your system?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
|
First of all, you should make sure Acrobat plugin is installed in your browser.
You would have to use correct Content Type :
Response.ContentType = "application/pdf";
Response.AddHeader("content-length",contentBytes.Length.ToString());
Response.BinaryWrite(contentBytes);
If you just need to open it in the browser totally, you can also use
Respose.Redirect("yourpdffile.pdf") which will automatically take the content type.
You should also look into the KB article of Microsoft :
http://support.microsoft.com/kb/307603/EN-US/[^]
Hope this one will help you.
|
|
|
|
|
Hi,
How to merge two rows of same data in SSRS
Suppose I have a row like this
S.No Location Mandal
1 Hyderabad Hyderabad
I need to show output like
S.No Location Mandal
1 Hyderabad
Kindly Help me
|
|
|
|
|
I got this error morning...when i try to load my XML in DOM
what is it ???
i have DTD in same folder
my XML Start is
HTML Code:
<? version="1.0" encoding="UTF-8">
<!DOCTYPE srr SYSTEM "street.dtd">
what should i do ???
thanks in advnace....
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
This is what iam looing for
When ever i create a webpartzone with a id it gives that id as title for the webpartzone.
I do not want to display the zone title at all so that the end users can drag and drop
webparts from various zones.
What do i need to do for this
|
|
|
|
|
Are you looking for web parts Personalization ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I am using a DataTable and the Infragistics WebDataGrid on my page. I need to create a list of values that the user enters by making selections from provided list and dropdown boxes.
My issue is that if the user selects anything else, my grid only shows the most recent value, the new ones don't get added, they just replace what's already there.
Additionally, if a new search is initiated, the grid resets.
I know this will be a biting snake, but I am just not seeing it.
Below is the code from my button.
protected void btnAdd_Click(object sender, EventArgs e)
{
txtOnSaleDate.Text = "";
dt = ds.Tables["Schedule"];
DataRow row = dt.NewRow();
row["code"] = ddlMagazines.SelectedValue;
row["name"] = ddlMagazines.SelectedItem.Text;
if (lstIssueDate.SelectedItem != null)
{
if (txtOnSaleDate.Text == "")
{
row["issue"] = lstIssueDate.SelectedItem.Text;
row["onsale"] = lstIssueDate.SelectedValue;
}
else
{
row["issue"] = "1/1/1980";
row["onsale"] = txtOnSaleDate.Text;
}
}
else
{
row["issue"] = "1/1/1980";
row["onsale"] = txtOnSaleDate.Text;
}
dt.Rows.Add(row);
wgScheduleList.DataSource = dt;
wgScheduleList.DataBind();
wgScheduleList.Visible = true;
btnSave.Visible = true;
btnDone.Visible = true;
}
Thanks.
|
|
|
|
|
I figured it out.
Thanks.
|
|
|
|
|
How do i change the webpart zone title itself
|
|
|
|
|
Asking the same question again wont help..
Cheers!!
Brij
|
|
|
|
|
This is not the same question previously i asked webpart title and
now iam asking webpart zone title which is actually the ID for
webpart zone
Thanks
|
|
|
|
|
Some times it makes confused with the question title. So when you asking some questions please put proper subject
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Iam new to webparts. I have a list control in a webzone as my webpart.
Now the web part title comes as untitled.
I can set the webpart title using
WebPartZone1.WebParts(0).Title = "MAIN MENU".
But this will fail if i move my webpart to other webpartzone. How can is set the
title even if i move to other webpart zone
|
|
|
|
|
in the .aspx file:
(example)
<wp2:WebPartExcursieContentForm_0_0_1 id="ExcursieContentForm_2" runat="server"
Title="ExcursieContentForm"
ChromeType="None"/>
You could also search in your codebehind for the webpart by name instead of position.
|
|
|
|
|
<asp:WebPartZone ID="AlertZone" runat="server" PartChromeType="None" >
<ZoneTemplate>
<asp:ListView runat="server" ID="abnormalListView"
OnItemDataBound="Operator_ItemDataBound"
onselectedindexchanged="abnormalListView_SelectedIndexChanged" >
<LayoutTemplate>
<table width="100%">
<tr runat="server" ID="itemPlaceholder">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr runat="server" id="OperatorRow">
<td><asp:Label ID="FirstNameLabel" runat="server" Text='<%#Eval("First") %>' /></td>
<td><asp:Label ID="LastNameLabel" runat="server" Text='<%#Eval("Last") %>' /></td>
<td><asp:Label ID="ActionLabel" runat="server" Text='<%#Eval("Action") %>' /></td>
<td><asp:Label ID="ResultLabel" runat="server" Text='<%#Eval("Result") %>' /></td>
<td><asp:Label ID="AlertLabel" runat="server" Text='<%#Eval("Alert") %>' Visible="false" /></td>
</tr>
</ItemTemplate>
</asp:ListView>
</ZoneTemplate>
<HeaderStyle BackColor="#FAF1C3" />
</asp:WebPartZone>
I just have list control inside it. How do i get the title from it
|
|
|
|
|
Ooh, trickery
Unless you are witholding something, you actually don't have a webpart
Controls placed in a WebPartZone that are not a System.Web.UI.WebControls.WebParts.WebPart are wrapped (runtime) in a Webpart as if they were WebParts.
I never experimented with this situation, always used a 'real' webpart (no visual design mode, that's the downside).
You could still find the webpart by first finding the listview and then determining its parent.
|
|
|
|
|
Iam learning here. So my question might be basic
What do you mean by a real web part. Iam new to this
and so trying to learn.
Do you mean i should wrap my list control to a user control and
do this or do i need to write a custom web part.
I thought if you keep any server control inside the zone it becomes
a webpart. Iam just reading a book and implementing this
Thanks
|
|
|
|
|
You should indeed read up on the webpart subject.
NETLearning wrote: I thought if you keep any server control inside the zone it becomes a webpart.
It only looks that way. Your control gets wrapped in a WebPart, it does not 'become' a WebPart.
As I said before, to find your ListView loop through your Controls collection to find it and then locate its parent(the webpart).
|
|
|
|
|
hi all dev's
i have a problem and want some help, i have a showmodaldialog and its working fine but when i finish from it and click on button (ReName) the showmodaldialog take fulll size page and stops in it, now am providing the code to be more clear for u:-
(child page)
function ReturnParam()
{
var password= window.dialogArguments;
var old = document.getElementById("tbPasswordConfirm").value;
if(password!=old)
{
alert('Password does not match....');
}
else
{
var param = document.getElementById("tbNewPassword").value;
alert('New Password have changet to ' + param);
window.returnValue = param;
window.close();
}
}
what seems to be the problem.....!!!!???
|
|
|
|
|
use
window.opener='self';
window.close();
Setting window.opener will ensure that the window will be closed on next window.close call.
|
|
|
|
|
thx, that did work
|
|
|
|
|
Hi frds...
I am working with admin part of web application, and I want to give a facility to administrator to publish a release note first on testing server for a particular time period (administrator will give a date for publish it to live) and later when time will pass it will automatically publish on live server.
So my question is that how I will update live database with a given time ...
thanks
|
|
|
|
|
Does this things need to be done using ASP.NET ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|