|
Yeah that is the problem.It will be easy if i just passed the filename however on my case the filename of the pdf contains #. Are there any alternative ways so i can view the pdf in browsers?
|
|
|
|
|
rj_21_2003 wrote: How do I view pdf files in asp.net having a character # in its filename for example myfile#.pdf?
Try to encode the URL. When browser gets myfile#.pdf , it will look for a anchor tag with the name specified (in page links).
|
|
|
|
|
Exactly the same which I mentioned at the same time....
Apurva Kaushal
|
|
|
|
|
|
Thanks Apurva Kaushal and Navaneeth. URL encoding works.. Thank you very much
|
|
|
|
|
scroll bar moves up as the image changes in the addrotator.what should be done in order to keep that stationary.The images are filled dynamically in XML page.
|
|
|
|
|
This is because when the image changes, the page postback and your browser window is refreshed.
so to avoid that you should use the AJAX Update Panel Control. and set the trigger of Update Panel. and after that your scroll bar will be not affected by image changes in addrotator.
you can find the video tutorial on ajax.asp.net website.
|
|
|
|
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" Target="_self" Height="258px"
Width="150px" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" Interval="10000" runat="server">
</asp:Timer>
this is what the code i have used.but even am fcing the same problem.
Thanks
|
|
|
|
|
Now it seems like your web browser is not running the java scripts.
are you using firefox ? or check that IE has enabled javascripts. or try disabling the antivirus program.
because that code just working fine for me.
Or try to copy the code into some another test project and run.
|
|
|
|
|
Hi,
Thank you,for the suggestion.will try out what you have said.
Regards
|
|
|
|
|
Hi I have a problem in my datagrid. There are several word file are present in a specific table.
And this word files have their id in the table. My requirement is that in a datagrid I have to show those file as a link button in a datagrid cell.
mean when i will click at that link it will automatically open that attached document file.
Any one can provide the exact code for it should be appreciated.
Arun Sahoo
|
|
|
|
|
|
Hey man!,I know I m posting it for second time. Bcz i didn't get the answer for it.
U got it.
Arun Sahoo
|
|
|
|
|
Then you should have discussed it in the same thread inspite of creating a new.
Apurva Kaushal
|
|
|
|
|
|
Implement it in Item template column
<a Target="_blank" href='filepath' ></a>
Parwej Ahamad
|
|
|
|
|
Thnxs for answering it.
But can u give some more idea about it. Mean let i have a dataset which containt those file. So now tell me how can attach it to datagrid cell as a link?
Arun Sahoo
|
|
|
|
|
What he was mentioning is to create a template column and put the hyperlink control in it. Now you can assign whatever you want to that control.
Apurva Kaushal
|
|
|
|
|
In my application, i have a 2 dropdowns , textbox and checkbox. On select of checkbox,
I should enter enter value from first dropdown and second dropdown and also a value can be entered in the
textbox.
The checkbox is for default value, if it is checked, I should enter a value to textbox.
Everything works fine now. But when i enter these values and click save, it takes value from first and second dropdowns
and saves to database. I need the textbox value to be entered into grid and say the value in grid should display as follows
Example :
if i select customername from first dropdown
and customeraccountname from second dropdown
then check default checkbox, enter value in textbox as 24
the grid value saved should be displayed as
Column 1 Column2
-------- --------
Customername 24[Default]
The second column value is displaying as Customeraccountname only....
Any help would be thankful...
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
sajan ss wrote: ASP.NET,C#.NET Programmer
Hmm.....
sajan ss wrote: Customername 24[Default]
I'm not sure I understand. You say it's saving fine, so what bit do you need to add ? The word default by the number ? What is it you're having trouble with exactly ? You've defined your need OK, but then you've said 'everything works fine now'. So, what's the issue ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I need the second column value to be displayed in the way I said.
It showing as
CustomerName and CustomerAccountName now....
I want it to be in
CustomerName and 24[Default]
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Is 24 the account name ? I think you're saying you need to check if the textbox has a value, and if so, to insert that, but the task is so trivial and your explanation so longwinded, that I really don't know what the issue is
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Are you writing JavaScript on Check-Uncheck of Check Box ?
It seems somewhere you are assigning wrong values,
Try to Debug the code and find out where wrong values are getting assigned to Value in the grid
|
|
|
|
|
Did you try to do it yourself? Or want some one do things for you. Did you written any line of code?
|
|
|
|
|
Hi Everyone
I'm new to ASP.NET and am having trouble with my project. I am building it using Visual Web Developer 2008 Express. Language C#.
I have a gridview linked to a LinqDataSource. I want to add a search facility to the gridview as the database that is linked to it contains a lot of entries.
I downloaded the code from your site for the control to do this and altered everything to meet my specifications. Everything seems to work except that the gridview still remains the same with the original entries showing instead of showing the filtered entries.
The gridview shows four columns from the database table.
Hope someone out there can she some light on this as I'm pulling my hair out.
Thanx in anticipation
Andy
My code behind code is this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
public partial class Controls_PinsSearch : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void lbtnBasicSearch_Click(object sender, EventArgs e)
{
string sSearchText = GetBasicSearchString();
OnSearch(sSearchText);
lbtnCancelBasicSearch.Visible = true;
}
protected string GetBasicSearchString()
{
StringBuilder sb = new StringBuilder(string.Empty);
string sBasicSearchText = txtBasicSearch.Text.Trim();
if (sBasicSearchText == string.Empty)
return string.Empty;
string sFirstName = GetSearchFormattedFieldString("FirstName", sBasicSearchText, string.Empty, true);
sb.Append(sFirstName);
sb.Append(" OR ");
string sLastName = GetSearchFormattedFieldString("LastName", sBasicSearchText, string.Empty, true);
sb.Append(sLastName);
sb.Append(" OR ");
string sPinCode = GetSearchFormattedFieldString("PinCode", sBasicSearchText, string.Empty, true);
sb.Append(sPinCode);
sb.Append(" OR ");
string sFilter = GetSearchFormattedFieldString("Filter", sBasicSearchText, string.Empty, true);
sb.Append(sFilter);
sb.Append(" OR ");
string sSearch = sb.ToString();
return sSearch;
}
protected string GetSearchFormattedFieldString(string sfield, string value, string soperator, bool bForceStringType)
{
if (value.Trim() == string.Empty)
return string.Empty;
string _newValue = value.Trim();
string _operator = "=";
if (soperator != string.Empty)
_operator = soperator;
if (bForceStringType == false)
{
}
return _newValue;
}
public delegate void SearchEventHandler(string _SearchText);
public event SearchEventHandler Search;
protected virtual void OnSearch(string _SearchText)
{
if (Search != null)
{
Search(_SearchText);
}
}
protected void lbtnCancelBasicSearch_Click(object sender, EventArgs e)
{
txtBasicSearch.Text = string.Empty;
OnSearch(string.Empty);
lbtnCancelBasicSearch.Visible = false;
}
}
The markup code for the control is:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PinsSearch.ascx.cs" Inherits="Controls_PinsSearch" %>
<asp:Panel ID="pnlBasicSearch" runat="server" Width="100%">
<table>
<tr>
<td>
<asp:Label ID="lblBasicSearch" runat="server" Text="Search for:" ></asp:Label>
</td>
<td>
<asp:TextBox ID="txtBasicSearch" runat="server" Text="" MaxLength="50" Width="255px" />
</td>
<td>
<asp:LinkButton runat="server" ID="lbtnBasicSearch" CausesValidation="False" Text="Search" OnClick="lbtnBasicSearch_Click" />
</td>
<td>
<asp:LinkButton runat="server" ID="lbtnCancelBasicSearch" CausesValidation="False" Visible="false" Text="Cancel" OnClick="lbtnCancelBasicSearch_Click" />
</td>
</tr>
<tr>
<td colspan="2" align="right">
</td>
<td colspan="2"></td>
</tr>
</table>
</asp:Panel>
|
|
|
|