|
My comment that I made above was addressed to janet 2008 not you CG
|
|
|
|
|
Yeah, I got that. I wasn't keeping score, anyhow, just making sure that my position was made clear, in general.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I don't know how to send mail with out internet.
But I think we can develop something like that .
e.g. Client Server send message system
We will use Windows Form or WPF or Webform or anything else that can receive data from user
then we will save it into database.
database table should contain fields like these
PK
Sender
To
Message
Can it mimic "intranet email system" ?
|
|
|
|
|
jeffreyk wrote: send me ur comments.....as soon as possible
No. It does not work like that around here. How impolite
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
On Page load I am displaying Products with their images by using the Datalist.
I am binding image_url(Comes from db) to ImageButton.
It's Working Fine.
But When I add the code then It will display only first image. also gives error that
[System.InvalidCastException] = {"Unable to cast object of type 'System.Data.Common.DbDataRecord' to type 'System.Data.DataRowView'."}
protected void dgBindImage_ItemDataBound1(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DataRowView drv = (DataRowView)e.Item.DataItem;
ImageButton lnk = (ImageButton)e.Item.FindControl("imgPic");
//lnk.Text = drv["category_name"].ToString();
lnk.CommandArgument = drv["product_id"].ToString();
}
}
I am using below code for getting the Id of that image. because I am displaying information of image seperately.
protected void imgPic_Command(object sender, CommandEventArgs e)
{
string str = e.CommandArgument.ToString();
Response.Redirect("View_Product.aspx?Product_id=" + str);
}
Thanks
|
|
|
|
|
sjs4u wrote: DataRowView drv = (DataRowView)e.Item.DataItem;
sjs4u wrote: [System.InvalidCastException] = {"Unable to cast object of type 'System.Data.Common.DbDataRecord' to type 'System.Data.DataRowView'."}
Obviously, e.Item.DataItem is a DbDataRecord, not a DataRowView.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Friends,
I m using GridView,in my gridview i m having template column in that template column button was there.If i click the button the corresponding row id should get i have wrote the coding as
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow gr = grd_quantity.Rows[index];
ListItem lt = new ListItem();
lt.Text = Server.HtmlDecode(gr.Cells[0].Text);
But for me e.CommandArgument getting null and gives error
input string was not in correct format.Please help me how to get the id.
Thanks & Regards
Senthil Kumar
|
|
|
|
|
activityorder = (Request.QueryString["actorder"]);
<b> <asp:TemplateField HeaderText="Item_Ref" SortExpression="Item_Ref">
<ItemTemplate>
<asp:HyperLink ID="hyperlink" runat="server" NavigateUrl='<%# "page.aspx?firstvar=" + Eval("datafield") %>' Text='<%# Eval("datafield") %>' onClick = "do something" ></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField></b>
then use
<b>stringname = (Request.QueryString["firstvar"]);</b>
to get it
hope this helps
|
|
|
|
|
Hello friends, I am using gridview and want to add textbox at runtime. The no of textboxes to add depends upon certain value. Is is possible? How?
pls help me...thnx in advance..!
|
|
|
|
|
To add a textbox runtime just try
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["txt"] = 0;
}
}
public void name(object sender, EventArgs e)
{int txt = (int)ViewState["txt"];
TextBox txt1 = new TextBox();
txt1.ID = "txt" + (++txt).ToString();
Panel1.Controls.Add(txt1);
txt1.Text = ;
ViewState["txt"] = txt;
}
After creating a Panel in the .aspx page.
Can't understand why u need gridview.
Hope it helps
BYE
|
|
|
|
|
Hi,
I'm using the Ajax Control Toolkit, and I have a problem with the Tabs control.
On the Control Tollkit description it's written that the selected page should remain enabled after a postback..But it doesn't happens.
I'm using Visual Web Developer, and testing the pages using his virtual server.
After a postback the selected tab is changed, and is always selected the one who is open in the Web developer page..
Suggestions?
Thanks!
|
|
|
|
|
you may need to use
if (Page.IsPostBack == true)
{
do something i.e. set current tab as default
}
or not use default tab
put your code up if you want
hope that makes sense
|
|
|
|
|
I think I can do something similar, but I can't understand why it doesn't works with me, while it's supposed to work!
suggestions??
|
|
|
|
|
In the prototype that I tested with, the tab control did retain its value through postbacks, whether I changed tabs by clicking them in the UI or used the client script API to set the tab. The only time that I was able to reproduce the behavior that you are seeing is when I explicitly set the ActiveTabIndex property of the control on the server side. In that case, the index that I requested was honored.
Are you setting the ActiveTabIndex property at all? If so, you may need to ensure that you're only setting it when not in a postback.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
no, i'm not using the ActiveTabIndex, I'm just using the tabs without properties at all..
??
|
|
|
|
|
It may be helpful to post some of your code at this point, as I'm unable to reproduce the behavior that you're seeing. Hopefully, that will help us to find the issue.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
The matter is that it' doesn't depend from the code I used..
Every time I create a Tab panel from the Control Toolkit, even in a new page of a new project, the active tab is not preserved after postback.
Could it depend from Visual Web Developer?I'm trying to test it with the virtual server of VWD, perhaps it should work if the application is online..
Or not?
Is it normal to have it not working if trying from VWD?
Thanks!
|
|
|
|
|
Hi
I am using GridView control.I want to get cell value in RowCommand Event. I have tried this code
Grv_GridView.Rows[Grv_GridView.SelectedRow].Cells[0].Text
But I'm getting Error, How do I get cell value,
pls Help me
Thank & Regards
Vijay s
|
|
|
|
|
Hope it helps:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
((LinkButton)this.GridView1.Rows[Convert.ToInt32(e.CommandArgument)].Cells[0].Controls[0]).BackColor = Color.Red;
}
Amit Agarwal
|
|
|
|
|
Try this
int index = Convert.ToInt32(e.CommandArgument);
string pname = GridView1.Rows[index].Cells[0].Text;
|
|
|
|
|
Yes Its working,After that I am adding Button in Template column.After clicking that button Its invisible I have done that
using this code.
GridViewRow row = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
Button lblProdId = (Button)row.FindControl("btn");
lblProdId.Visible = false;
but now This code getting Error.
int index = Convert.ToInt32(e.CommandArgument);
string pname = GridView1.Rows[index].Cells[0].Text;
what i can do, Do u have any Idea
Thank & Regards
Vijay s
|
|
|
|
|
I want insert the .PDF file in internet explorer from add existing item (ASP .net with C#)
I am try to add the .pdf file into .aspx internet explorer but the pdf file format not accept the text format....
can be add any dll file in my project for convert the pdf file to text
|
|
|
|
|
add required pdf to ur project.ie ; copy and paste it in to ur project.then give appropriate link.if u not installed the acrobat reader u cant open the uploaded pdf files.
|
|
|
|
|
Is this not a repeated question?
|
|
|
|
|
copy and paste u r .pdf file in u r wesite folder and write on button_click event
server.transfer("test.pdf")
and if u have pasted u r document in a folder then
server.transfer("folder_name\test.pdf")It will take the Path automatically upto your main website folder i.e. "C:\Inetpub\wwwroot\Website1\"
(can open any kind of documents e.g.*.doc,*.csv,*.pdf,*.txt,*.xls,*.mdb,*.ppt,*.pps etc)
it will directly open your file.
modified on Friday, April 11, 2008 7:59 AM
|
|
|
|