|
i read a social.msdn[^] thread, some problem in upload image in IE7, is this true?
Raju.M
|
|
|
|
|
makhaai wrote: some problem in upload image in IE7, is this true
No! We have it and working perfectly fine.
If you read the response to the query asked, there might be path issue with the person reported.
|
|
|
|
|
i dont think the problem arise because of path, its working with IE6. and i aslo seen some threads but now one answer that question. but our thread have update please social.msdn[^]
Raju.M
|
|
|
|
|
I tried this
byte[] imageContent = (byte[])(ds2.Tables[0].Rows[0]["Signature_File"]);
MemoryStream ms1 = new MemoryStream(imageContent);
//IDataObject data = new IDataObject();
Bitmap bmp;
Image returnimage = Image.FromStream(ms1).ToString();
I am getting Parameter is not valid error
Please help
Thanks,
Raghvendra Panda
|
|
|
|
|
I m creating a website in ASP.NET using C#.through the web I want to monitor the activities of all the folders present at "C:\Inetpub\ftproot\san".User can work on any type of files and not only text files.Since we have given 1GB space (lets say) to each user, so user can do anything to utilize this space.
Now I want to monitor the activites that the user will do in his folder like creating new file, deleting an existing file or editing a file.I want to monitor user's activities because i have to keep track of the space given to the user so tht i can restrict the user to use 1GB space only and not more than that. is there any class that i can use other than FileSystemWatcher as it works only in console applications and not in webapplications?? any help would be highly apperciated.. Many thanks
|
|
|
|
|
My suggestion: create a Windows Service that runs continuously (using FileSystemWatcher), and records the activity to a database that your ASP can read/display from.
|
|
|
|
|
Thanx but it is relly necessary to create a windows service??? cant we use FSW purely with web services .. ?? if yes then how ???
|
|
|
|
|
Even if you could, think about it: do you only want to monitor folder activity while someone has your page open? And to ignore changes after they close it?
Sounds to me more like you want all activity captured, and when someone wants to look at that history, display it on a web page.
|
|
|
|
|
SENARIO: i have few folders on my FTP server, belongs to particular user. Suppose i have 10GB total space and i assign 1GB to each user i.e can accomodate 10 users having 1GB each.
now users can add/delete/edit any type of file to utilize the storage space. All i need to do is to restrict users not to exceed 1gb space for their file storage. For this i want to use FileSystemWatcher to notify me that a user had created/deleted/edited a file so that i can minimize the space from 1gb incase of creation of a file or add a space incase of deletion.
this is the piece of coding using FSW. when user gets loged-in with proper id and password, respective folder is opened (present at FTP server) where he can add/delete/edit any type of file and according to that i hav to monitor d space ulitilized by him.
but d problem is the event handlers (written in console). i dont understand what happens when this code is being runned... i dontknow how to use FSW class so that i can monitor d changes user is making in his folder.
please help plz plz ... THANX
using System.IO;
using System.Threading;
using System.Diagnostics;
public partial class _Default : System.Web.UI.Page
{
DAL conn;
string connection;
string id = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Documents and Settings\\project\\Desktop\\BE prj\\dbsan.mdb;Persist Security Info=False";
conn = new DAL(connection);
////*** Opening Respective Folder of a User ***////
DirectoryInfo directories = new DirectoryInfo(@"C:\\Inetpub\\ftproot\\san\\");
//DirectoryInfo directories = new DirectoryInfo(@"C:\");
DirectoryInfo[] folderList = directories.GetDirectories();
if (Request.QueryString["id"] != null)
id = Request.QueryString["id"];
string path = Path.Combine(@"C:\\Inetpub\\ftproot\\san\\", id);
int folder_count = folderList.Length;
for (int j = 0; j < folder_count; j++)
if (Convert.ToString(folderList[j]) == id)
{
Process p = new Process();
p.StartInfo.FileName = path;
p.Start();
}
ClsFileSystemWatcher FSysWatcher = new ClsFileSystemWatcher();
FSysWatcher.FileWatcher(path);
}
public class ClsFileSystemWatcher
{
public void FileWatcher(string InputDir)
{
using (FileSystemWatcher fsw = new FileSystemWatcher())
{
fsw.Path = InputDir;
fsw.Filter = @"*";
fsw.IncludeSubdirectories = true;
fsw.NotifyFilter =
NotifyFilters.FileName |
NotifyFilters.Attributes |
NotifyFilters.LastAccess |
NotifyFilters.LastWrite |
NotifyFilters.Security |
NotifyFilters.Size |
NotifyFilters.CreationTime |
NotifyFilters.DirectoryName;
fsw.Changed += new FileSystemEventHandler(OnChanged);
fsw.Created += new FileSystemEventHandler(OnCreated);
fsw.Deleted += new FileSystemEventHandler(OnDeleted);
fsw.Renamed += new RenamedEventHandler(OnRenamed);
fsw.Error += new ErrorEventHandler(OnError);
fsw.EnableRaisingEvents = true;
//string strOldFile = InputDir + "OldFile.txt";
//string strNewFile = InputDir + "CreatedFile.txt";
//// Making changes in existing file
//using (FileStream stream = File.Open(strOldFile, FileMode.Append))
//{
// StreamWriter sw = new StreamWriter(stream);
// sw.Write("Appending new line in Old File");
// sw.Flush();
// sw.Close();
//}
//// Writing new file on FileSystem
//using (FileStream stream = File.Create(strNewFile))
//{
// StreamWriter sw = new StreamWriter(stream);
// sw.Write("Writing First line into the File");
// sw.Flush();
// sw.Close();
//}
//File.Delete(strOldFile);
//File.Delete(strNewFile);
// Minimum time given to event handler to track new events raised by the filesystem.
Thread.Sleep(1000);
}
}
public static void OnChanged(object source, FileSystemEventArgs e)
{
Console.WriteLine("File " + e.FullPath + " :" + e.ChangeType);
}
public static void OnDeleted(object source, FileSystemEventArgs e)
{
Console.WriteLine("File " + e.FullPath + " :" + e.ChangeType);
}
public static void OnCreated(object source, FileSystemEventArgs e)
{
Console.WriteLine("File " + e.FullPath + " :" + e.ChangeType);
}
public static void OnRenamed(object source, RenamedEventArgs e)
{
Console.WriteLine("File " + e.OldFullPath + " [Changed to] " + e.FullPath);
}
public static void OnError(object source, ErrorEventArgs e)
{
Console.WriteLine("Error " + e.ToString());
}
}
|
|
|
|
|
Hi,
I have a repeater with rows with different values. When i click on a row i have to show div with Repeater row values on it.
Is there anyway to do this using JQuery or Client side functionality?
Help on this really appreciate it.
|
|
|
|
|
Imran. Mohammed wrote: Is there anyway to do this using JQuery or Client side functionality?
Yes
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can you please let me know how to do this?
|
|
|
|
|
You didn't provide any details at all so it would be difficult to give you any useful example relevant to your solution. For instance, what is in the repeater? Table rows? Button? Image?
<table>
<tr onclick=ShowRow(rowx)>
<td>
<div id=rowx>Some values</div>
</td>
</tr>
</table>
function ShowRow(row)
{
$(row).show()
}
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My repeater is as below
<br />
<tr><br />
<td class="dataRowTxt" width="110px"><br />
<%# (DataBinder.Eval(Container.DataItem, "Name"))%><br />
</td><br />
<td class="dataRowTxt" width="70px"><br />
<%# (DataBinder.Eval(Container.DataItem, "InterestRate","{0:0.000}%"))%><br />
</td><br />
<td class="dataRowTxt" width="92px"><br />
<asp:LinkButton runat="server" class="dataRowLnk" ><br />
<%# (DataBinder.Eval(Container.DataItem, "MonthlyPayment","{0:C}"))%></asp:LinkButton><br />
</tr><br />
When i click on the link button, i have to show the a div or a modal popup with values (resides at my backend) related to particular row.
Hope you are clear now.
|
|
|
|
|
|
Not from my ass...
I mean to say the data is at server or bind to repeater items.
I have gone through the Jquery dialog, but it doesn't populate the data.
Can you please help me out if you know better way of doing this?
|
|
|
|
|
Of course it doesn't populate anything, it isn't magic.
If you need to retrieve the data from the server, then make an Ajax call. The call could return formatted html to be placed inside the div or return data to be placed in a template.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can you provide me an example of above functionality?
Thanks in advance !!
|
|
|
|
|
Here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I don't understand what your saying... sorry i am a beginner to development.
my problem here is i have a div tag with asp label controls on it. By default i am not going to show it.
On Page Load i will fill the repeater with all the values ( you can say with 3 rows)
Each row contains Details link, if i click on the details link i have to show the div tag. When i am showing the div i have to assign the values related to particular row to labels in my div.
Hope you understand.
|
|
|
|
|
Hi! I think that Mark Nischalke is only playing with you and he isn't seriously at all!
Here[^] is a tutorial that I've made about jQuery, Web Methods and SQL Server Data Populating in Grid View... I hope you know a little of spanish if not, just try to understand and apply to your web site.
Looks like the same procedure but with some changes... hope it helps
|
|
|
|
|
English is the default language here. Creo que es usted quien está jugando.
All of the information has been presented to the OP, learning does more than giving code.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I didn't ask which language is here!
but thanks
este ud ayudando o no, tampoco me interesa. Solo trato de responder la respuesta a la pregunta anterior, no busco nada mas! gracias
|
|
|
|
|
Hi,
I have a gridview which I dont know the number of columns it is created by a dynamic query and AutoGenerateColumns = true.
I need to put the columns of the gridview in editable mode except the first one for insert the data typed into the database.
Thanks.
|
|
|
|
|
amina89 wrote: I need to put the columns of the gridview in editable mode except the first one for insert the data typed into the database.
Are you trying to ask that you want first row normal and rest of them in editable mode? If so, probably you need to use the RowDataBound event where trap the first row and show it as is and rest of the rows in a Edit mode.
|
|
|
|