|
Hi All,
Here is my requirement,
I am developing a web site where a consumer can see his water bills online. page contain Bill's image in the background say bill.aspx.
on that image I am showing his related data from database.
when user click on button (say show my bill) bill.aspx is shown. when bill.aspx is shown a problem arises, that data from sql is shown first, and then image of the bill is loaded, which looks odd. so my client wants to show this page as pdf in browser. as i dont have pdf files , all my record is fetching from database dynemically. please guid me to show my bill.aspx page as pdf in browser.
regards .
muhammad kashif butt
|
|
|
|
|
You will need to buy a library that generates PDFs, then write those down to the browser.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
well any idea towards this technique?
muhammad kashif butt
|
|
|
|
|
Hi All,
I need to split a line like this
1 100224 KBD PS-2 104KEYS TVSE GOLD WHITE 6600 9213549 Indian Core Team
I am using split function to split these words.the splitting is not working proper.I am adding these string in to quick watch some square is displaying between the words. i need to split the word with the square displaying.Plse help me.
Shiji
|
|
|
|
|
This is the third time you are asking the same question !!
shijivijayan wrote: the splitting is not working proper.
What do you mean by not working proper?
|
|
|
|
|
shijivijayan wrote: .the splitting is not working proper
Yes, it is. It will split based on whatever character you give it. The square means there's a control character in your strings, instead of a space.
If this is homework, you should talk to your teacher. If it's paid work, you should be bloody ashamed of yourself. We are happy to help people, but for someone of this skill level to charge for their 'efforts', is a disgrace.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
HI All.
I have Designed a Templated Gridview. and Binds it for the first page load with a predefined DataTable Object which contains some columns.
Now I want to add a new row each time when i click on Add button, while adding new row, the previous state of GridView should not be changed.
what do i do?
|
|
|
|
|
Just follow the following code :
private DataTable GetData(int count)
{
DataTable dt = new DataTable();
dt.Columns.Add("col1");
dt.Columns.Add("col2");
dt.Columns.Add("col3");
DataRow dr=null;
for (int i = 0; i <= count; i++)
{
dr = dt.NewRow();
dr["col1"] = "";
dr["col2"] = "";
dr["col3"] = "";
dt.Rows.Add(dr);
}
return dt;
}
private DataTable GetNewData(int count)
{
DataTable dt = new DataTable();
dt.Columns.Add("col1");
dt.Columns.Add("col2");
dt.Columns.Add("col3");
DataRow dr = null;
for (int i = 0; i < count; i++)
{
dr = dt.NewRow();
dr["col1"] = ((TextBox)grdOrd.Rows[i].Cells[0].FindControl("txtCol1")).Text;
dr["col2"] = ((TextBox)grdOrd.Rows[i].Cells[1].FindControl("txtCol2")).Text;
dr["col3"] = ((TextBox)grdOrd.Rows[i].Cells[5].FindControl("txtCol3")).Text;
dt.Rows.Add(dr);
}
dr = dt.NewRow();
dr["col1"] = "";
dr["col2"] = "";
dr["col3"] = "";
dt.Rows.Add(dr);
return dt;
}
protected void Page_Load(object sender,EventArgs e)
{
if(!IsPostBack)
{
GetData(0);
}
}
protected void btnAddNewRow_Click(object sender,EventArgs e)
{
GridView1.DataSource = GetNewData(grdOrd.Rows.Count);
GridView1.DataBind();
}
<asp:GridView runat="server" id="GridView1" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Col1">
<ItemTemplate>
<asp:TextBox runat="server" id="txtCol1" Text='<%#Eval("col1")%>'></asp:TextBox>
</ItemTemplate>
<FooterTemplate>
<asp:Button runat="server" Id="btnAddNewRow" OnClick="btnAddNewRow_Click"/>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Col2">
<ItemTemplate>
<asp:TextBox runat="server" id="txtCol2" Text='<%#Eval("col2")%></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Col3">
<ItemTemplate>
<asp:TextBox runat="server" id="txtCol3" Text='<%#Eval("col3")%></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
ARINDAM
|
|
|
|
|
hi all,
I am using VS 2005,C# with framework 2.0 and AJAX toolkit. I got a datagridview and already create a CommandField, button type. I would like to display particular row details by modalpopup extender.
Currently i am using code behind (gridview_SelectedIndexChanged to get neccesarry data) and method modalpopupextender.Show() to acheive it,but its is pretty slow when browse via internet (its ok if browse locally). My coding is show like below:
aspx:
<asp:GridView ID="DataGridProduct" runat="server" <code>OnSelectedIndexChanged="DataGridProduct_SelectedIndexChanged"</code> AutoGenerateColumns="False">
<Columns>
<asp:CommandField ButtonType="Image" ShowSelectButton="True" HeaderText="View" />
<asp:BoundField DataField="ProdCode" HeaderText="Code" ReadOnly="True" SortExpression="ProdCode"
</asp:BoundField>
<asp:BoundField DataField="ProdDesc" Visible="False" />
<asp:TemplateField>
<HeaderTemplate>Description</HeaderTemplate>
<ItemTemplate><%# Limit(Eval("ProdDesc"),25)%></ItemTemplate>
</asp:TemplateField>
</Columns>
modalpopup
<cc1:ModalPopupExtender <code>ID="mpeProduct"</code> runat="server" TargetControlID="Button1" PopupControlID="panelProduct" CancelControlID="btnClose" BackgroundCssClass="modalBackground" PopupDragHandleControlID="panelDrag" Drag="true">
</cc1:ModalPopupExtender>
aspx.cs
protected void DataGridProduct_SelectedIndexChanged(object sender, EventArgs e)
{
if (DataGridProduct.SelectedDataKey[4].ToString() == "Horizontal")
{
lblProductCode.Text = DataGridProduct.SelectedDataKey[0].ToString();
lblProductName.Text = DataGridProduct.SelectedDataKey[1].ToString();
txtProductSpec.Text = DataGridProduct.SelectedDataKey[2].ToString();
txtProductDescription.Text = DataGridProduct.SelectedDataKey[3].ToString();
ImgDisplay.ImageUrl = DataGridProduct.SelectedDataKey[5].ToString().Trim();
<code>mpeProduct.Show();</code>
}
}
so,can i use client script to acheive it, get datagridrow's data and display in modalpopup extender?
any advice and tips are welcome,
thanks in advance
regards
cocoonwls
|
|
|
|
|
Is there any way to get a onchange event to the textboxes that are shown when gridview is in edit mode??
thanks
Peterson
|
|
|
|
|
only client side
http://www.w3schools.com/jsref/jsref_onchange.asp[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
thanks for the response,
but how can I declare the onChange event for the boundfield/textbox that shows up in the grid?
I mean, where should I do it?
I create the grid column at runtime, is there any way to set the onChange of the boundfield at this momment?
thanks
Peterson
|
|
|
|
|
Yes, use GridView's RowCreated event. eg.
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
TextBox tb = (TextBox)e.Row.FindControl("Textbox1");
tb.Attributes.Add("onchange", "onchangeFunction();");
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
and is it guaranteed that the textboxes have names like textbox1, textbox2 and so on? I mean, gridview created this controls by itself, I don't name them...
thanks
Peterson
|
|
|
|
|
I never tried that, you can check the name by placing a breakpoing in that event and search for the controls gridview created. or name will be same as you write in columns template.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi ..
am getting error like this..can anyone help..in my pageload there is no errors ..only 1 error from aspx page
Error:does not contain a definition for 'ddlYear_SelcetedIndexChanged'
<%@ Register TagPrefix="users" TagName="YearDropdownList" Src="~/UserControls/YearListBox1.ascx" %>
.aspx
<td width="80" align="left"><users:YearDropdownList ID="ddlYear" runat="server" ToolTip="Select a Year" OnSelectedIndexChanged="ddlYear_SelcetedIndexChanged" /></td>
.aspx.cs
<asp:DropDownList ID="ddlYear" runat="server" Enabled="true" Width="75px" AutoPostBack="true" CssClass="dropdown" ToolTip="Select a Year." OnSelectedIndexChanged="ddlYear_SelectedIndexChanged" />
pageload:
protected void dd1Year_SelectedIndexChanged(Object sender, EventArgs e)
{
sYear = ddlYear.SelectedValue.Trim();
}
|
|
|
|
|
Why do you show us the 'register' part ? Is the event inside the control's .cs file ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You mean Usercontrol .cs file..Yeah i wrote my method in usercontrol..i am calling stored procedure in usercontrol to display list of years..
|
|
|
|
|
I notice you use Object instead of object, but I'm not sure that should matter. Other than that, I see no reason, if the control is in usercontrol.aspx and the event is in usercontrol.aspx.cs, for there to be an issue.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Have you copy and pasted the code snippets and the error message? I ask because the method name in the error message doesn't match those in the code.
|
|
|
|
|
Hello, Not sure if this is the correct place to ask this question but I'll give it a shot...
I have a need that perhaps one of you can point me in the right direction with...
I would like to implement something very similar to what’s out on www.target.com or www.gap.com.
When you click a button (quick view, quick info, etc..) you get a new window with product pics and info.
Here's the link:
http://www.target.com/Star-Wars-Clone-Favorite-Characters/b/ref=nav_t_spc_10_23/184-2346213-9435346?ie=UTF8&node=673254011...(and click on "Quick Info" under any image)
Perhaps I can do this with a widget or something else but I’m not sure what kind of widget it would be. I believe it's done with Ajax!
If someone could provide "ANY" useful information, it would be “GREATLY” appreciated
Thank you in advance,
~Mario
|
|
|
|
|
I would suggest that you need to do some reading. I don't believe you have any idea what AJAX is or does. This COULD be done with AJAX, but as it's just a popup window, that appears wasteful to me. However, the ASP.NET AJAX library probably does have a control for this sort of thing, it seems like it's a styled div, which would mean it's sitting on top of a transparent div, to stop interaction with the stuff underneath. You could use AJAX to request the script, or you could push the script down with the page, ultimately, this is done with javascript. You can probably right click on the page and view source, and probably open some include files, to find the script that does it, but it sounds like you should focus on some more basic stuff, first.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
~I don't believe you have any idea what AJAX is or does.~
That is why I was asking, duh!! Anyway, I figured out on how to do it is by using a ModalPopup window. Thanks for the info and vote of confidence...
|
|
|
|
|
CSharpBeginner wrote: ~I don't believe you have any idea what AJAX is or does.~
That is why I was asking, duh!!
Well, I guess my point is, if you use things you don't understand, then you're going to run into issues.
CSharpBeginner wrote: Anyway, I figured out on how to do it is by using a ModalPopup window
Yeah, that makes sense. The point tho, is that if you use stuff you don't understand, you will get in trouble.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
the user must first enter a value then click enter...This redirects the user to an internal search engine page written in javascript. i want the value to display in the internal search engine text box. I can get it to redirect but I get the error 'txtSearch2 is not part of _Default Class' in the code behind.
Me.txtSearch2.Text = Request.QueryString("Name")
if you need more info please let me know!!!!!
|
|
|
|