|
This is a programming forum, if you want to advertise pay for it
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
How to get the play time of a video file in asp.net
|
|
|
|
|
|
Hey Guys Need ur advise !!
What cause my DataGrid to trigger my OnDeleteCommand Twice even though i only click the delete button once?
Thanks a million
KaKaShi HaTaKe
|
|
|
|
|
hi i want to kill / destory session["abc"] only how can i do that??
i dont not want to destory rest of sessions exist on my website except this one...
umerumerumer
|
|
|
|
|
mr_muskurahat wrote: hi i want to kill / destory session["abc"] only how can i do that??
i dont not want to destory rest of sessions exist on my website except this one...
use Session.Remove("abc") ;
And if you are more interested you can read Exploring Session in ASP.Net[^]
|
|
|
|
|
I want to import the data of a grid view to XL sheet...I used the folllowing code
GridView1.AllowPaging = False
Call btndisplay_Click(sender, e)
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.xls"
Dim stringWrite As New System.IO.StringWriter()
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
Me.GridView1.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()
GridView1.AllowPaging = True
Call btndisplay_Click(sender, e)
The code works but when i have 0 in the begning (like 00ABCD),it dosent take the 0 and tkes ABCD only..
How can i format the column to text (in code behind) so that it would accept zero in the begning
Regards
|
|
|
|
|
|
anujbanka1784 wrote: pls help fresher..
Please help yourself by searching the forum. This question is asked daily.
|
|
|
|
|
|
You do not have the required attributes to be a programmer, choose another career path.
|
|
|
|
|
|
Looks to me as if you are a bit hurt. Cheer up
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Hi!! I have Binded list of files from a directory into datagrid. i have also added an hyperlink to the datagrid so that the particular file will open after clicking it. But when i do so i get an error message as follows..
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /TestMain/Needle brg and oil seal pressing.pdf
THE PAGE_LOAD CODE IS
protected void Page_Load(object sender, EventArgs e)
{
try
{
//String[] f = Directory.GetFiles("c:/gearfactory");
dir = new DirectoryInfo(Server.MapPath("~/gearfactory"));
articleList.DataSource = dir.GetFiles("*.pdf");
//articleList.DataSource = f;
articleList.DataBind();
}
catch (Exception ex)
{
Response.Write("Error :-" + ex);
}
}
THE DATAGRID SOURCE CODE IS
<asp:HyperLinkColumn DataNavigateUrlField="Name" DataTextField="Name"
HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Write Time"
ItemStyle-HorizontalAlign="Center" DataFormatString="{0 }" />
<asp:BoundColumn DataField="Length" HeaderText="File Size"
ItemStyle-HorizontalAlign="Right"
DataFormatString="{0:#,### bytes}" />
</Columns>
</asp:DataGrid>
Can some one help me with this. Thank you in advance.
Ashish.
|
|
|
|
|
Hi friends
I need to generate automatic keywords while you register yahoo and gmail ie. we enter one by one first name ,address etc., at last a code shown in a box that is automatic generate code. I want to know how to generate the code using asp.net. Is it possible??
Hope yours reply.
Every Successful Person Have A Painful Story
|
|
|
|
|
Guvera wrote: I need to generate automatic keywords while you register yahoo and gmail ie. we enter one by one first name ,address etc., at last a code shown in a box that is automatic generate code. I want to know how to generate the code using asp.net. Is it possible??
You are asking for CAPTCHA Image. There are many good article available in Codeproject.
Please have a look,
CAPTCHA Image[^]
and
A CAPTCHA Server Control for ASP.NET[^]
|
|
|
|
|
Hi,
What is BizTalkServer?
Where we use it?
What is the special feature ?
Please share your ideas..
----
Glossy**
|
|
|
|
|
Glossy wrote: Hi,
What is BizTalkServer?
Where we use it?
What is the special feature ?
Here is Two Best Link For you
1. Ref1[^]
and
2.Ref2[^]
|
|
|
|
|
Hai Friends,
I put a label in master page enabled page.I want to get the id of that label in another page where the second page is not a masterpage enabled page.How i get the label control id in the second page.Please help me.
|
|
|
|
|
You can't, if it doesn't use the master page, then the masterpage does not exist for that page lifecycle. You need to store it in the session or something.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
please send some code how to convert the session to control.
|
|
|
|
|
string labelid =(Label)session("name");
umerumerumer
|
|
|
|
|
I am developing website using C# with ASP.net.
one page I am inserting data into hashtable after reach 1000(>1000),Add it into Array list than Insert into Database...here sometimes saying Exception like
Item has already been added. Key in dictionary: '12' Key being added: '12'
...Please help me with this.....How to avoid this Eception...
and I am using following code..
public static Hashtable ht = new Hashtable();
public string Crid="";
Crid = ht.Count.ToString();
string[] st = new string[4];
st[0] = Crid;
st[1] = "5654546456";
st[2] = "0";
st[3] = "1";
if (ht.Count<1000)
{
ht.Add(ht.Count, st);
}
else
{
ArrayList list = new ArrayList();
foreach (int key in ht.Keys)
{
list.Add(ht[key]);
}
ht.Clear();
ht = new Hashtable();
ht.Add(ht.Count, st);
for (int j = 0; j < list.Count; j++)
{
//here Inserting data into Database
}
}
Raaj
|
|
|
|
|
Isn't it obvious ? Don't add a key that is already there. So, check if the key exists and if it does, decide if you want to change the value that's there, or leave it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you are using a static variable in a web application, you have to synchronise all access to it. The reason for the error is that two users are adding items at the same time. You are lucky that you got such a descriptive error message, you could just as well have corrupted the HashTable and got some internal error in the HashTable code...
Use a List instead of a HashTable. You are only using the key of the HashTable as an index anyway.
Instead of copying the items one by one into a new collection, just keep them in the collection where they are.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|