|
Hi ,
I am developing a website with DATA GRID that displays the details of a student. When I click on the registration no of the student, a new page should open with the full details of the student(Datagrid only shows important details of the student).
Please discuss your ideas to achieve this.
Ram
--------------------------------------
Defeat is not the worst of failures. Not to have tried is the true failure.
|
|
|
|
|
Maybe you could use the HyperLinkColumn class. It could be the column where the registration numbers of the students are; bind the column text and hyperlinks to the same database where you draw the student data from. You can read more about this class here.
|
|
|
|
|
how i can retrieve the number of input/output operations generated by each process in the task manager using c#?
|
|
|
|
|
I doubt you can, unless you use interop.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How to get the values through ItemCommand Event in datagrid?
|
|
|
|
|
What values do you want ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
using System;
public class class1
{
static void Main(string[]args)
{
try
{
string s1 = args[0];
string s2 = args[1];
int i1 = int.Parse(s1);
int i2 = int.Parse(s2);
int i3 = i1 + i2;
Console.WriteLine(i3);
}
catch (Indexoutofrange Exception)
{
Console.WriteLine(Exception.message);
}
Console.WriteLine("hello");
}
}
when i am running the application it shows the following error
the type or namespace name indexoutofrange could not be found and one more error is system.exception does not contain a definition for message
|
|
|
|
|
aratireddy wrote: the type or namespace name indexoutofrange could not be found
Its IndexOutOfRangeException and not Indexoutofrange, case sensitive
aratireddy wrote: ne more error is system.exception does not contain a definition for message
is because of,
aratireddy wrote: catch (Indexoutofrange Exception)
{
Console.WriteLine(Exception.message);
Its Message and not message. Exception is a class in the .Net library, use some other name for the exception variable.
|
|
|
|
|
Hi,
Can anybody help me to develop a voice conference application? I made a deep search in internet to study about voice conference application, but i didt find any helpful topics.
What are the techniques to develop a voice conference application?
Thankyou,
yesuprakash
|
|
|
|
|
|
what is the technology used to develop voie chat application.
|
|
|
|
|
C#[^] ??
Did you read this [^]?
|
|
|
|
|
hi friends i have created 1 activex in that i have error at run time which is
"Could not load file or assembly 'DirectShowLib-2005, Version=2.0.0.0, Culture=neutral, PublicKeyToken=67e7b740cdfc2d3f' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)"
Source="StreamVideoComponent2"
CAN U PLZ HELP ME IN THIS MATTER
|
|
|
|
|
hi all ...
I found that alot of (server , client) applications have this part of code in the "server"
<br />
void StartMethod()<br />
{<br />
<br />
<br />
mytcpl = new TcpListener(5020);
mytcpl.Start();
mysocket = mytcpl.AcceptSocket();
myns = new NetworkStream(mysocket);
mysr = new StreamReader(myns);
string order = mysr.ReadLine();<br />
if (order == "SD")<br />
<br />
<br />
<br />
else MessageBox.Show(order + " Request Not Found");<br />
mytcpl.Stop();
<br />
<br />
<br />
<big>if (mysocket.Connected == true)
{<br />
while (true)<br />
{<br />
StartMethod();
}<br />
}<br />
}</big><br />
the Question is :
why to check if the 'socket' is connected where it is already closed by stoping the 'TCP Listener' ?
thanx
|
|
|
|
|
A_A wrote: else MessageBox.Show(order + " Request Not Found");
mytcpl.Stop(); // Close TCP Session
//when stop the tcp listener doesn't that mean that we stop 'disconnect' the socket
No when we stop the TCP listener it does not mean that we will be disconnected .
To make it more clear , a TCP listener is a class which waits for the connection to happen at specified port and IP , the listener does not participate in actual connection and data transfer , the actual connection and data transfer is carried out object of class Socket (mysocket variable in above code) , mytcpl.Stop(); stop the listener that mean that we are no more accepting new connection , the the already connected connection are still there
I hope this is understandable
Thanks
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
thank you
|
|
|
|
|
i have imagelist inside listview box. i need to add that imagelist images in to another imagelist.how can i do that......
i can get imgage index by
ListViewItem item = e.Dtat.GetData(typeof(ListViewItem)) as ListViewItem;
item.imageindex by this i can get image index of fistlist view.
so how can i add the image in to new image list using this image index??
or is there got any other possible way...
A S E L A
|
|
|
|
|
Hi,
I haven't used ImageList class yet, but I just read some of the documentation, and that helps.
An ImageList has a Images property, which is a collection, meaning you can get one of its members by using an index, you can clear the collection by calling Clear(), and adding to the collection by calling Add(). So this would be my first attempt:
foreach(Image image in ImageList1) {
myListView.Images.Add(image);
}
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:56 AM
|
|
|
|
|
ya but how can i call image by image index.....i don't have image path oretc have pnly image index of other image list....
A S E L A
|
|
|
|
|
Hi,
as I already told you, you can use an index or an enumerator.
Here is an index example:
myListView2.Images.Add(myListView1.Images[0]); // "copy" first image
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:57 AM
|
|
|
|
|
im doing drag drop to listview imagelist images....selected images.my drag drop part cannot work...i tried so many type of coding but could't now im tring....creat another image list in listview 2 and add those selected items images in to that list view...i can add item text but cannot add image....anyone if can pl help me.....
thanks a lot here is my code...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
namespace Project_import_1
{
public partial class ImportForm : Form
{
public ImportForm()
{
InitializeComponent();
}
OpenFileDialog dlg = new OpenFileDialog();
private void import(object sender, EventArgs e)
{
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(100, 80);
imageList.ColorDepth = ColorDepth.Depth32Bit;
int i = 0;
string[] files = dlg.FileNames;
string[] pathes = new string[files.Length];
foreach (string file in files)
{
pathes[i] = file;
i++;
}
foreach (string path in pathes)
{
FileInfo fileInfo = new FileInfo(path);
String strDir = fileInfo.Name;
listView1.Items.Add(strDir);
imageList.Images.Add(Bitmap.FromFile(path));
listView1.TileSize = new System.Drawing.Size(100, 80);
}
for (int j = 0; j < pathes.Length; j++)
{
this.listView1.Items[j].ImageIndex = j;
}
this.listView1.View = View.LargeIcon;
this.listView1.LargeImageList = imageList;
}
private void btnImport_Click(object sender, EventArgs e)
{
dlg.Filter = "All Image Files|*.bmp;*.ico;*.gif;*.jpeg;*.jpg;" +
"*.jfif;*.png;*.tif;*.tiff;*.wmf;*.emf|" +
"Windows Bitmap (*.bmp)|*.bmp|" +
"Windows Icon (*.ico)|*.ico|" +
"Graphics Interchange Format (*.gif)|*.gif|" +
"JPEG File Interchange Format (*.jpg)|" +
"*.jpg;*.jpeg;*.jfif|" +
"Portable Network Graphics (*.png)|*.png|" +
"Tag Image File Format (*.tif)|*.tif;*.tiff|" +
"Windows Metafile (*.wmf)|*.wmf|" +
"Enhanced Metafile (*.emf)|*.emf|" +
"All Files (*.*)|*.*";
dlg.InitialDirectory = @"C:\Documents and Settings\All Users\Desktop\";
dlg.Multiselect = true;
try
{
if (dlg.ShowDialog() == DialogResult.OK)
{
import(sender, e);
}
dlg.Reset();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnsave_Click_1(object sender, EventArgs e)
{
try
{
SaveFileDialog dlgSave = new SaveFileDialog();
saveFileDialog1.Filter = "*.jpg|*.jpg|*.bmp|*.bmp|*.gif|*.gif";
saveFileDialog1.ShowDialog();
if (dlgSave.ShowDialog() == DialogResult.OK)
{
if (dlgSave.FileName != "")
{
}
}
catch
{
MessageBox.Show("there is no Pic selected please select a Pic first", "Dear " + System.Environment.UserDomainName);
}
}
private void listView1_ItemDrag(object sender, ItemDragEventArgs e)
{
this.listView1.DoDragDrop(this.listView1.SelectedItems[0], DragDropEffects.Copy);
}
private void listView1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(ListViewItem)))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void listView2_ItemDrag(object sender, ItemDragEventArgs e)
{
this.listView2.DoDragDrop(this.listView2.SelectedItems[0], DragDropEffects.Copy);
}
private void listView2_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(ListViewItem)))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void listView2_DragDrop(object sender, DragEventArgs e)
{
ListViewItem item = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
this.listView2.View = View.LargeIcon;
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(100, 100);
imageList.ColorDepth = ColorDepth.Depth32Bit;
foreach (ListViewItem each in listView1.SelectedItems)
{
listView2.Items.Add(item.Text, item.ImageIndex);
imageList.Images.Add(Bitmap.FromFile(
*********** HOW CAN I TAKE SELECTED IMAGES TO HERE*********************));
listView2.TileSize = new System.Drawing.Size(100, 80);
}
for (int j = 0; j < listView1.SelectedItems.Count; j++)
{
this.listView1.Items[j].ImageIndex = j;
}
this.listView2.View = View.LargeIcon;
this.listView2.LargeImageList = imageList;
foreach (ListViewItem removeItem in listView1.SelectedItems)
{
listView1.Items.Remove(removeItem);
}
}
private void listView1_MouseDown(object sender, MouseEventArgs e)
{
ListViewItem item = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
DirectoryInfo dir = new DirectoryInfo(Directory.GetCurrentDirectory());
String strDir = fileInfo.Name;
listView1.Items.Add(strDir);
tbxPath.Text = dir.FullName;
}
protected void DisplayFileInfo(FileInfo TheFile)
{
}
}
}
|
|
|
|
|
asw.asela wrote: HOW CAN I TAKE SELECTED IMAGES TO HERE
this.listView1.LargeImageList[each.ImageIndex]
|
|
|
|
|
LargeImageList like property but is used like a method....telling that error....
A S E L A
|
|
|
|
|
Sorry...
this.listView1.LargeImageList.Images[each.ImageIndex]
|
|
|
|
|
no still no...i think should be somthing like add or insert etc method....
A S E L A
|
|
|
|