Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Very Urgent - Please suggest me a solution

Reply
Thread Tools

Very Urgent - Please suggest me a solution

 
 
settyv@gmail.com
Guest
Posts: n/a
 
      11-14-2006

Hi,

Please help me how can i call the below function on click of datagrid
hyperlink column.


public MemoryStream GetMinuteOrderPdf(SearchParams sp)
{
DMS dms = new DMS();

sp.IsMinuteOrder = true;

return dms.getDocument(sp);//it returns the PDF memory stream
}




ASPX code:

<asp:TemplateColumn HeaderText="Minute Order" >
<ItemTemplate>
<asp:HyperLink
NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
Order"))%> ></asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>


Please help me how can i call this function.Is there any way to do
this?


Thanks,
Vishnu

 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGF2aWQgQ29sbGl2ZXI=?=
Guest
Posts: n/a
 
      11-14-2006
You can't do it from a hyperlink column as that does not create the event. If
you MUST use a hyperlink column, then call a new page (or pass a querystring
parameter to this page) and call the function from that.

You would normally use a linkbutton or button to cause an event, then in
that event, generate your PDF.

Hope this helps.

Regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available


"(E-Mail Removed)" wrote:

>
> Hi,
>
> Please help me how can i call the below function on click of datagrid
> hyperlink column.
>
>
> public MemoryStream GetMinuteOrderPdf(SearchParams sp)
> {
> DMS dms = new DMS();
>
> sp.IsMinuteOrder = true;
>
> return dms.getDocument(sp);//it returns the PDF memory stream
> }
>
>
>
>
> ASPX code:
>
> <asp:TemplateColumn HeaderText="Minute Order" >
> <ItemTemplate>
> <asp:HyperLink
> NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
> Order"))%> ></asp:HyperLink>
> </ItemTemplate>
> </asp:TemplateColumn>
>
>
> Please help me how can i call this function.Is there any way to do
> this?
>
>
> Thanks,
> Vishnu
>
>

 
Reply With Quote
 
 
 
 
settyv@gmail.com
Guest
Posts: n/a
 
      11-14-2006


Thanks for your suggestion.So you meant to say that the below code will
work assuming that i declared linkbutton in the datagrid control:

protected void grdMinSearch_ItemDataBound(object sender,
DataGridItemEventArgs
e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
LinkButton btn = e.Item.FindControl("linkView") as
LinkButton;
Minute Min=new Minute();

e.Item.Attributes["onclick"] =
Min.GetMinuteOrderPdf(SearchParams sp);


btn.Style[HtmlTextWriterStyle.Display] = "none";


}
}

Please comment on this.

Thanks,
Vishnu

David Colliver wrote:
> You can't do it from a hyperlink column as that does not create the event. If
> you MUST use a hyperlink column, then call a new page (or pass a querystring
> parameter to this page) and call the function from that.
>
> You would normally use a linkbutton or button to cause an event, then in
> that event, generate your PDF.
>
> Hope this helps.
>
> Regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Portal franchises available
>
>
> "(E-Mail Removed)" wrote:
>
> >
> > Hi,
> >
> > Please help me how can i call the below function on click of datagrid
> > hyperlink column.
> >
> >
> > public MemoryStream GetMinuteOrderPdf(SearchParams sp)
> > {
> > DMS dms = new DMS();
> >
> > sp.IsMinuteOrder = true;
> >
> > return dms.getDocument(sp);//it returns the PDF memory stream
> > }
> >
> >
> >
> >
> > ASPX code:
> >
> > <asp:TemplateColumn HeaderText="Minute Order" >
> > <ItemTemplate>
> > <asp:HyperLink
> > NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
> > Order"))%> ></asp:HyperLink>
> > </ItemTemplate>
> > </asp:TemplateColumn>
> >
> >
> > Please help me how can i call this function.Is there any way to do
> > this?
> >
> >
> > Thanks,
> > Vishnu
> >
> >


 
Reply With Quote
 
David
Guest
Posts: n/a
 
      11-14-2006
Hi,

I can't see anything wrong with that, though there may be some others with
more experience than me that might be able to see any potential issues.

Best regards,
Dave Colliver.
http://www.BracknellFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
>
>
> Thanks for your suggestion.So you meant to say that the below code will
> work assuming that i declared linkbutton in the datagrid control:
>
> protected void grdMinSearch_ItemDataBound(object sender,
> DataGridItemEventArgs
> e)
> {
> if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
> ListItemType.AlternatingItem)
> {
> LinkButton btn = e.Item.FindControl("linkView") as
> LinkButton;
> Minute Min=new Minute();
>
> e.Item.Attributes["onclick"] =
> Min.GetMinuteOrderPdf(SearchParams sp);
>
>
> btn.Style[HtmlTextWriterStyle.Display] = "none";
>
>
> }
> }
>
> Please comment on this.
>
> Thanks,
> Vishnu
>
> David Colliver wrote:
>> You can't do it from a hyperlink column as that does not create the
>> event. If
>> you MUST use a hyperlink column, then call a new page (or pass a
>> querystring
>> parameter to this page) and call the function from that.
>>
>> You would normally use a linkbutton or button to cause an event, then in
>> that event, generate your PDF.
>>
>> Hope this helps.
>>
>> Regards,
>> Dave Colliver.
>> http://www.AshfieldFOCUS.com
>> ~~
>> http://www.FOCUSPortals.com - Portal franchises available
>>
>>
>> "(E-Mail Removed)" wrote:
>>
>> >
>> > Hi,
>> >
>> > Please help me how can i call the below function on click of datagrid
>> > hyperlink column.
>> >
>> >
>> > public MemoryStream GetMinuteOrderPdf(SearchParams sp)
>> > {
>> > DMS dms = new DMS();
>> >
>> > sp.IsMinuteOrder = true;
>> >
>> > return dms.getDocument(sp);//it returns the PDF memory stream
>> > }
>> >
>> >
>> >
>> >
>> > ASPX code:
>> >
>> > <asp:TemplateColumn HeaderText="Minute Order" >
>> > <ItemTemplate>
>> > <asp:HyperLink
>> > NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
>> > Order"))%> ></asp:HyperLink>
>> > </ItemTemplate>
>> > </asp:TemplateColumn>
>> >
>> >
>> > Please help me how can i call this function.Is there any way to do
>> > this?
>> >
>> >
>> > Thanks,
>> > Vishnu
>> >
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need help doing some question very very urgent plzzz vhdl124 VHDL 1 04-28-2008 01:06 AM
very very urgent ahmdsd_ostora Hardware 2 05-07-2007 12:38 PM
Please suggest how to use this timeout solution jonefer ASP .Net Security 0 02-07-2007 01:14 AM
Very Very Urgent - Please help me settyv@gmail.com ASP .Net 3 11-15-2006 09:02 PM
Quick Book file access very very very slow Thomas Reed Computer Support 7 04-09-2004 08:09 PM



Advertisments