|
Thanks for response...
i have tried as you suggest links.
but then also its not working properly... its says that file is currepted...
|
|
|
|
|
When you say "it" says the file is corrupted we have no idea what "it" is. Is it media player? Is it iTunes? We also don't know what you are doing after retrieving the data from the database. Are you streaming to a browser? Are you saving to a file?
|
|
|
|
|
hi..
i am streaming to browser.... how can i do this task?
Thanks.
PUJA FALDU
|
|
|
|
|
Are you sure the player you have supports the codec the file is recorded with? Have you tried saving the file to the filesystem both before saving it to the database and after retrieving from the database rather than streaming and seeing if that works? If the file is corrupted you need to try some debugging steps to track down exactly when in the process the corruption is ocurring.
|
|
|
|
|
Hi
In My application, I am Using Model PopUP
In which data are coming in a grid with paging.
But Problem is that when I am Clicking on 2nd paging, Page Model popup
Become Closed, So Is there any way to stop that model popup,
My model popup is in Update panel
thanks in Advanced
|
|
|
|
|
You're using the ModalPopupExtender from the AjaxToolKit, right? If so, the problem is the occurring postback while paging.
Although i remember that there was a better solution than mine, i unfortunately dont remember the solution itself..So heres mine:
Either put the content of your popup in a seperate updatePanel (if that works for you), or call the Show method of your popupextender
again in the paging event. This way it should stay open (at least i'm doing this somewhere in a click-event of a button and this way it stays open).
Hope this helps somehow.
|
|
|
|
|
Hi!
Make sure that you modalpopup is placed in an updatepanel which has not got chlidrenastrigger.
You have to ensure that the control that causes the popup is not reloaded with the postback.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi All,
I am using Ajax toolkit and extenders for asp.net2.0..I have 3 collapsible panels.I want to collapse/expand all the panels on single panel click...
Do any one out there has code for that..any idea will be helpful..
Thanks in advance..!!
|
|
|
|
|
<asp:DataList ID="cartview" runat="server" BorderColor="#E0E0E0" BorderStyle="Solid"
BorderWidth="1px" CellPadding="0" CellSpacing="0" GridLines="Horizontal" OnItemDataBound="cartview_ItemDataBound"
RepeatColumns="1" Width="528px" OnItemCommand="cartview_ItemCommand" ForeColor="Black">
<FooterStyle BackColor="Black" ForeColor="Black" />
<SelectedItemStyle Font-Bold="True" ForeColor="Black" />
<ItemTemplate>
<table border="2" bordercolor="black" cellpadding="0" cellspacing="0" style="width: 729px">
<tr>
<td style="width: 760px">
<table border="0">
<tr>
<td style="width: 760px;">
<asp:Panel ID="pnlExpand" runat="server" BackImageUrl="~/images/bg-menu-main.png"
Width="775px">
<div style="vertical-align: middle; cursor: pointer;">
<table width="774" border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 90px; height: 30px; padding-left: 5px;" align="left">
<asp:Label ID="lblTxnId" runat="server" ForeColor="White" Text='<%# Eval("TxnId") %>'
Font-Bold="True" Font-Size="11px" Font-Names="Verdana" Width="60"></asp:Label>
<asp:HiddenField ID="hdTxnType" Value='<%# Eval("txntype") %>' runat="server" />
</td>
<td align="left" style="width: 180px;">
<asp:Label ID="lblDesignName" runat="server" Font-Bold="True" ForeColor="White" Text='<%# Eval("designname") %>'
Font-Size="11px" Font-Names="Verdana"></asp:Label></td>
<td align="center" style="width: 180px;">
<asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="11px" ForeColor="White"
Text='<%# Eval("TxnDate") %>' Font-Names="Verdana"></asp:Label></td>
<td colspan="2" align="center" style="width: 170px">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="11px"
ForeColor="White" Text='<%# Eval("AdminStatus") %>'></asp:Label></td>
<td align="center" style="width: 70px;">
<asp:ImageButton ID="imgbtnnewmessage" runat="server" AlternateText="(Show Messages....)"
ImageUrl="~/images/post.gif" CommandName="newmessagehdr" Height="20px" /></td>
<td align="right" style="width: 20px;">
<asp:ImageButton ID="Image1" runat="server" AlternateText="(Show Detalis....)" ImageUrl="../images/expand_blue.jpg" /></td>
</tr>
</table>
</div>
</asp:Panel>
</td>
<td style="width: 142px;">
<asp:Button ID="btnArchive" CommandName="movetoarchive" runat="server" CssClass="button_ina"
Text="Move to Archive" Width="110px"></asp:Button>
</td>
</tr>
</table>
<asp:Panel ID="pnlControlID" runat="server" CssClass="collapsePanel">
<table border="0">
<tr>
<td align="center" bgcolor="#000000" style="background-color: #dcdcdc; text-align: center;">
<asp:GridView AutoGenerateColumns="False" CellPadding="1" CellSpacing="1" CssClass="input"
GridLines="None" ID="GridView2" OnPageIndexChanging="GridView2_PageIndexChanging"
OnRowCommand="GridView2_RowCommand" OnRowDataBound="GridView2_RowDataBound" runat="server"
DataKeyNames="txntype,SubTxnID,txnTypeK,txnid" Width="770px" Font-Names="Verdana"
Font-Size="11px" Font-Strikeout="False" BackColor="Silver">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table width="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:Button CommandArgument="<%#((GridViewRow)Container).RowIndex%>" CommandName="View"
Font-Bold="True" ID="lnkbtn1" runat="server" Text="View Details" ToolTip="Click to see the specifications of this quotation/order/edit."
Font-Names="Arial" Font-Size="12px" ForeColor="red"></asp:Button></td>
<td>
<asp:Button CommandArgument="<%#((GridViewRow)Container).RowIndex%>" CommandName="Edit"
Font-Bold="True" ID="LinkButton1" runat="server" Text="Edit Design" Font-Names="Arial"
Font-Size="12px"></asp:Button></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="SubTxnId" HeaderText="Quotation No." />
<asp:BoundField DataField="SubTxnId" HeaderText="Order No." />
<asp:BoundField DataField="SubTxnId" HeaderText="Edit No." />
<asp:BoundField DataField="subtxnref" HeaderText="Order/Edit reference" />
<asp:TemplateField HeaderText="Order Type">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("txnTypeK") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("txnTypeK") %>' Font-Names="Verdana"
Font-Size="11px"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Chase Order">
<ItemTemplate>
<%--<input type ="button" id ="btnchase" value="Chase Order" Class="button_ina" onClick="window.open('message.aspx?keepThis=true<%# Eval("SubTxnId")%>&TxnID=<%# Eval("TxnId")%>','mywindow','width=800,height=425','resizable=true')"/>--%>
<span><a href="#" onclick="window.open('Message.aspx?keepThis=true<%# Eval("SubTxnId")%>&TxnID=<%# Eval("TxnId")%>','mywindow','width=800,height=525, resizable=1')"
title="Message" style="color: Red;">
<asp:Label ID="btnchase" Text="Chase Order" ForeColor="black" runat="server" Height="20px"
Width="35" /></a></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText=" Message">
<ItemTemplate>
<span style="padding-left: 15px;"><a onclick="window.open('ReadMessages.aspx?keepThis=true<%# Eval("SubTxnId")%>&TxnID=<%# Eval("TxnId")%>','mywindow','width=800,height=725, resizable=1')"
title="Message" style="color: Red;">
<asp:Image ID="imgbtnnewmsg" ImageUrl="~/images/post.gif" runat="server" Height="20px"
Width="25px" /></a> </span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkbtnacancelorder" runat="server" CommandArgument="<%#((GridViewRow)Container).RowIndex%>"
CommandName="cancelorder" Width="150px" ForeColor="red">Cancel Order</asp:LinkButton>
</ItemTemplate>
<HeaderTemplate>
<a href="" class="showTip L5">Terms</a>
</HeaderTemplate>
</asp:TemplateField>
<asp:BoundField DataField="TxnId" Visible="false" HeaderText="Txn No." />
</Columns>
<RowStyle BackColor="AliceBlue" BorderColor="SkyBlue" BorderStyle="Solid" BorderWidth="1px"
CssClass="input" ForeColor="#333333" HorizontalAlign="Left" Width="20px" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" Height="25px"
HorizontalAlign="Left" Font-Names="Arial" Font-Size="12px" Font-Strikeout="False" />
<AlternatingRowStyle ForeColor="#284775" />
</asp:GridView>
<br />
</td>
</tr>
</table>
</asp:Panel>
<ajaxToolkit:CollapsiblePanelExtender ID="cpeDemo" runat="Server" CollapseControlID="pnlExpand"
Collapsed="True" CollapsedImage="../images/show.gif" CollapsedText="(Show Details...)"
ExpandControlID="pnlExpand" ExpandedImage="../images/close.gif" ExpandedText="(Hide Details...)"
ImageControlID="Image1" SkinID="CollapsiblePanelDemo" SuppressPostBack="true"
TargetControlID="pnlControlID" TextLabelID="Label1">
</ajaxToolkit:CollapsiblePanelExtender>
</td>
</tr>
</table>
</ItemTemplate>
<ItemStyle BorderStyle="None" Font-Names="Verdana" ForeColor="Black" />
<SeparatorStyle BorderStyle="None" />
<HeaderTemplate>
<table align="center" border="0" cellpadding="1" cellspacing="1" style="height: 26px;
color: #ffffff; background-color: transparent; width: 890px;" class="top_hearder_panel">
<tr>
<td align="left" style="width: 90px; height: 18px; color: #000000; font-size: 12px;
font-family: Arial; padding-left: 10px;">
TXN NO.</td>
<td align="left" style="width: 195px; height: 18px; color: #000000; font-size: 12px;
font-family: Arial;">
DESIGN NAME</td>
<td align="left" style="width: 150px; height: 18px; color: #000000; font-size: 12px;
font-family: Arial;">
SENT DATE TIME</td>
<td colspan="2" align="center" style="width: 175px; color: #000000; height: 18px;
color: #000000; font-size: 12px; font-family: Arial;">
STATUS</td>
<td align="left" style="color: #000000; height: 18px; color: #000000; font-size: 12px;
font-family: Arial;">
MESSAGES
</td>
<td align="left" bgcolor="#ffcc66" style="color: #000000; height: 18px; color: #000000;
font-size: 12px; font-family: Arial;">
<a href="ArchiveHistory.aspx" class="showTip L2">
<asp:Label ID="lblarchivehistory" ForeColor="black" runat="server" Text="ArchiveHistory"></asp:Label></a>
</td>
</tr>
</table>
</HeaderTemplate>
<HeaderStyle BackColor="#BDC0C7" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
Font-Bold="True" Font-Names="Verdana" Font-Size="11px" ForeColor="Black" Height="25px" />
</asp:DataList>
|
|
|
|
|
What's the problem? In the collapse/Expand event, write the logic to expand/collapse all of them at once.
|
|
|
|
|
I have done expand/collapse for each individual panel..But if I add one more panel and click of this I want the rest of the panels to expand/collapse..
Can you provide the code for this.......!
|
|
|
|
|
hi
i need a scenario where i need to show all methods in a list view and a the point of executing the program i need to show that in listview that method is executing with some tick mark after completion. considering method taking some time .
thanks in adv..
|
|
|
|
|
|
I have an aspx page and and I utilize a static web method defined in the codebhenind of the page. I need a way to access controls on the page to do some databinding from this static method, but when I try to access the control I get the following error:
Error 1 An object reference is required for the non-static field, method, or property 'AccessRequestForm.AssignRole.UpdateRoleGrid
How do I access an instance of the page I am on from a static method? The codebehind I am using is included below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Xml;
using System.Xml.XPath;
using AccessRequestForm.UtilityServices;
using AccessRequestForm.BusinessServices;
using AccessRequestForm.Models;
using AjaxControlToolkit;
namespace AccessRequestForm
{
public partial class AssignRole : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
IQueryable<MasterRole> roleList = Role.SelectAll(Convert.ToInt32(strBUSelected));
lstRoles.Items.Clear();
foreach (MasterRole role in roleList)
{
ListItem li = new ListItem(role.role_business_desc.ToString(), role.role_id.ToString());
lstRoles.Items.Add(li);
}
UpdateRoleGrid(roleList);
}
}
public void UpdateRoleGrid(IQueryable<MasterRole> roleList)
{
grdRoles.DataSource = roleList;
grdRoles.DataBind();
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string[] GetCompletionList(string prefixText, int count, string contextKey)
{
IQueryable<MasterRole> roleList = Role.SelectStartPattern(Convert.ToInt32(contextKey), prefixText);
List<string> items = new List<string>(count);
int i = 0;
foreach (MasterRole role in roleList)
{
if (i++ < count)
{
string strName = role.role_business_desc.ToString();
items.Add(strName);
}
}
UpdateRoleGrid(roleList);
return items.ToArray();
}
}
}
|
|
|
|
|
If you understand the ASP.NET lifecycle you will understand why it is not possible to do this. You are calling the GetCompletionList method out of band, meaning that the request is not being processed by the ASP.NET engine hence the controls are not being created and thus not available for access. Typically this type of action is handled with client side JavaScript, or perhaps an AJAX UpdatePanel would be more useful for you.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I want to implement a solution (like AJAX AutoCompleteExtender) where the information entered in a text box filters the rows displayed in a GridView. So as the user types in letters in the textbox, it will trigger the OnKeyPress event on the client side, pass the letters entered to a WebMethod on the server side, and get the results back in a callback routine on the client side. The problem is now that I have the data on the client side, how do I refresh the contents of the GridView with it?
Is there a better way to approach this? I thought of UpdatePanel but I need to capture the OnKeyPress on the client side because the textBox does not trigger KeyPress events on the server side.
Thanks.
Adam
|
|
|
|
|
|
|
I'm currently developing a compositecontrol, there was something I didn't understand, so I decided to create a little control to reproduce the problem to find out why this problem occurs. When running the following code I get the error above.
<ParseChildren(False, Nothing), PersistChildren(True)> _
Public Class CompositeTest
Inherits CompositeControl
Dim pnl As Panel
Dim txt As TextBox
Dim dde As AjaxControlToolkit.DropDownExtender
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
MyBase.OnInit(e)
pnl = New Panel
txt = New TextBox
dde = New AjaxControlToolkit.DropDownExtender
End Sub
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
pnl.ID = "pnl"
txt.ID = "txt"
dde.ID = "dde"
dde.TargetControlID = "txt"
pnl.Controls.Add(txt)
pnl.Controls.Add(dde)
Controls.Add(pnl)
'MyBase.Render(writer)
End Sub
End Class
The question is why does this happen? And where in a control's lifecycle will a (extender-) control be registered?
|
|
|
|
|
let's have a look to my little dummy control again
on this way it works, but is it the right way to work with a composite control?
<ParseChildren(False, Nothing), PersistChildren(True)> _
Public Class CompositeTest
Inherits CompositeControl
Dim pnl As Panel
Dim txt As TextBox
Dim dde As AjaxControlToolkit.DropDownExtender
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
pnl = New Panel
txt = New TextBox
dde = New AjaxControlToolkit.DropDownExtender
pnl.ID = "pnl"
txt.ID = "txt"
dde.ID = "dde"
dde.TargetControlID = "txt"
pnl.Controls.Add(txt)
pnl.Controls.Add(dde)
Controls.Add(pnl)
MyBase.OnInit(e)
End Sub
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
pnl.RenderControl(writer)
End Sub
End Class
|
|
|
|
|
hy,
I have a gridview in which i have a list of files.i want a code which should help me to print the entire file without opening it.the file would get printed by the default printer that had been set.the file may can be of ay format like pdf or txt etc.
Thnks & Ragards ,
Raghvendra Panda
|
|
|
|
|
Can't be done. There is no way to create a piece of software that can handle any and all file formats and correctly send them to a printer.
I am also glad it can't be done. No web page should be able to take over my hardware. I can just imagine some shady ink cartridge company with a banner for ink refills printing several pages of 8x10 black squares and their ad says "Are you low on ink? Maybe you should check again."
|
|
|
|
|
Below may help you
<button onclick="printPage()">print</button>
<div id="printerDiv" style="display:none"></div>
<script>
function printPage()
{
var div = document.getElementById("printerDiv");
div.innerHTML = '<iframe src="mypage.aspx" onload="this.contentWindow.print();"></iframe>';
}
</script>
For more help : pranayamr.blogspot.com
|
|
|
|
|
hy...thnks for the code..itz working fine...but i want to set default printer settings so that the print dialog doesnt come out..
can u please tell me how i can do that...
|
|
|
|
|
Dear friends,
I am trying to upload one excel file to sqlserver database by using fileupload control. I am initially uploading the file and saving in a temporary folder and from this temporary folder I am copying the data to SqlServer Table. After copying the data, I want to delete the file in Temporary Folder. I wrote File.Delete(filename) code, but it is throwing following exception
[System.IO.IOException] = {"The process cannot access the file 'E:\\SourceSafe\\ESSP\\Finance\\FinancePL\\uploadedfiles\\samplePS.xls' because it is being used by another process."}
It is not allowing to delete the file. Please, can anyone help me in this. It's very urgent. Please....
Thanks,
Dileep.
|
|
|
|