|
|
Hi,
I want when my FileUpload has file do something,
If FileUpload1.HasFile Then<br />
FileUpload1.PostedFile.SaveAs(Path +".....")<br />
End If
But why it always returns Flase?
How I can solve this problem?
Please help me.
Thank You
Hoda
|
|
|
|
|
What it most likely means is that the FileUpload does not have the file. The next more pertinent question is why does it not? That I can't answer without more information.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
What else do you have in that page?
Are you using updatepanels?
Alexei Rodriguez
|
|
|
|
|
Thank You,
yes i'm using Update Pannel.
Hoda
|
|
|
|
|
Fileupload controls cant be used with async postback
Add a postback trigger for the control causing the postback
Alexei Rodriguez
|
|
|
|
|
HI CAN ANYBODY TELL ME THE VB.NET CODE TO SEND THE ASPX PAGE CONTENT TO A PARTICULAR EMAIL ID
THANKS
GIRI
|
|
|
|
|
girikaimal wrote: HI CAN ANYBODY TELL ME THE VB.NET CODE TO SEND THE ASPX PAGE CONTENT TO A PARTICULAR EMAIL ID
THANKS
GIRI
This is not the right way to post.
|
|
|
|
|
|
I have a dropdown control in a datalist. Suppose there are 10 Rows in this datalist. If, for example, I select a value from the dropdown of the fifth row of the datalist, I need to get the ID or INDEX of that particular row of the datalist.
Remeber, dropdown doesnot have CommandName property.
Please help in achieving this.
modified on Thursday, April 30, 2009 8:39 AM
|
|
|
|
|
What about storing the row no. in the value property of the drop-down list while binding. You can store the row no. as a comma seperated value. While getting just extract the value and use it.
Either you love IT or leave IT...
|
|
|
|
|
Yeah, but even for that I need to have the row id of that datalist control. This is needed while using FindControl.
ddlDropdown= (DropDownList)dlDataList.Items[dlRowNumber].FindControl("ddlLinkRefObjectType");
|
|
|
|
|
hi all,
I want to create resuable user control which can be used in microsoft nav and for that i need to register user control so please help me...
Reasons are not Important but Results are Important.
Swati Tripathi
|
|
|
|
|
I'm not sure what you're asking. Have you written your control ? A user control needs .NET, both of the options only work in IE.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
thanx for reply.
yes i have created my usercontrol in vb.net with strong name after that i followed the below steps
1> Registring my usercontrol using RegAsm
2> Gac Deployment using Gacutil
after completing the above process my usercontrol will be avilable in microsoft nav ...
but when i create an instance of an usercontrol i m not able to get any method or property.
so this is my actual problem.
Reasons are not Important but Results are Important.
Swati Tripathi
|
|
|
|
|
Hi,
We have an application which is almost to work with network IP addresses. A Webpage is need to build which retrieve all the Local Area Network IP addresses of the current domain.
Please help me out from this.
Ramesh Sambari
|
|
|
|
|
Easy!
using System;
using System.Collections.Generic;
using System.Text;
using System.DirectoryServices.ActiveDirectory;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry("LDAP://yourdomain");
System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(entry);
search.Filter = "(objectClass=computer)";
foreach (System.DirectoryServices.SearchResult resEntAs in search.FindAll())
{
Console.WriteLine(resEntAs.GetDirectoryEntry().Name.ToString());
}
Console.ReadLine();
}
}
}
Now just request for the IP using System.Net.Dns.GetHostByName()
|
|
|
|
|
Can anybody help in developing the asp.net application with multiple users using sqlconnection.
We have written connectionstring in web.config file but still application is working for multiple sql connection.
|
|
|
|
|
So, what do you want to achieve? That all users are using a single sql connection (then you have to use a static connection - singleton pattern), or every user has its own connection (then use an instance for each user and store it within the session).
Regards
Sebastian
|
|
|
|
|
So can u provide singleton pattern example.
|
|
|
|
|
public static class GlobalConnection
{
public static readonly SqlConnection Value;
static GlobalConnection()
{
Value = new SqlConnection("...");
Value.Open();
}
}
Everywhere you need the connection you call:
GlobalConnection.Value
But this approach will:
1 - Use a single connection for all clients and threads.
2 - Will not reconnect if the connection is lost.
But maybe this works for your needs or as a sample on how to do the job.
Another approach will be:
public static class GlobalConnection
{
private static object _lock = new object();
private static SqlConnection _value;
public static SqlConnection Value
{
get
{
lock (_lock)
{
if (_value == null)
_value = new SqlConnection("...");
switch(_value.State)
{
case ConnectionState.Closed:
case ConnectionState.Broken:
_value.Open();
break;
}
}
}
}
}
This one will reopen the connection if it is closed.
|
|
|
|
|
Hi
i have a page where iam binding a gridview to a datatable that is selcting from a sql database table that has one clustered and 3 nonclustered indexes. On rowdatabound iam doing some calculations/counting not very complex and loading them in several viewstates. The execution time of stored procedure that selects the data takes less than a second to ececute. as a result i assume that it is not a database issue.
The issue is that when i dont allow paging on the gridview, the page takes around 4 minutes to load(the grid return 400 rows only). When i allow paging = 50 then it takes 3-4 seconds.
I have debbuged and didnt reach a result everything is working fine page load, master page load....
Is there a way i can tell the cause root of the problem. Thanks
modified on Thursday, April 30, 2009 4:48 AM
|
|
|
|
|
samerh wrote: The issue is that when i dont allow paging on the gridview, the page takes around 4 minutes to load(the grid return 400 rows only). When i allow paging = 50 then it takes 3-4 seconds.
Why are you showing 400 Records in Grid. You can minimize the records to improve the performance. Show maximum 50 Records or may be less than that in grid. If you think it will increase the total page size, set the filter criteria to minimize the records.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Abhijit Jana wrote: Why are you showing 400 Records in Grid. You can minimize the records to improve the performance.
400 records is not a huge amount. Isn't it?
|
|
|
|
|
Hmmmm this is the problem the user wants to view all records. i cant convince him at all
|
|
|
|