|
how to build a glossary in c#.....with person names as hyperlinks.when hyperlink is clicked information regarding that person shoud be displayed.please help me ..its urgent.
|
|
|
|
|
It's ALWAYS urgent
Most likely, you'd have the data in your database, and you'd link back to a page that shows the details that takes the Id of hte person on the query string, so you can load it from the database.
Are you doing this for school, or for your job ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi, my problem is in .aspx page i have 2 dropdown list buttons one is for to select status and one is for to select for usertype.
What i want is in designing phase if i select status as 1 then in second dropdownlist displays only related item how to do this one, any one give me one idea.
for example if i select like below in second dropdownlist displays related item
<pre>
DropDownList1.SelectedItem .Text="1"
</pre>
srinivas
|
|
|
|
|
1 - give your variables real names
2 - handle the selected index changed event on the first list, and when it fires, populate the second list accordingly
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
In windows application we are using datagrid in readonly mode. If user right clicks on particular cell then copy/ paste menu is displaying. User is copying content and trying to paste in other cell, as datagrid is in readonly mode so user can't paste, but in first cell it is showing edit icon.
We don't want that edit icon if datagrid is readonly, so I thought we can disable right click menu only.
If any other solution is available for hiding edit icon, please let me know.
Anybody if knows, solution for this, please give URL or sample code.
Thanks & Regards,
Kumar
|
|
|
|
|
Hello
You can disable the contextmenu if you path an empty menu to the property of the control:
ContextMenu cm = new ContextMenu();
yourControl.ContextMenu = cm;
Or you modify the existing menu liek you want.
All the best,
Martin
|
|
|
|
|
Hello Martin,
Thank you for your reply, but it is working for datagrid like column header.
My problem is datagrid populated with few rows and columns, If I select from columns new menu is not displaying, it is displaying default windows right click menu i.e. Undo, Cut, Copy, Paste,Delete and Select All.
I want to disable or hide this menu.
once again thank you for your help.
Thanks & Regards,
Kumar
|
|
|
|
|
Hello,
In .Net 2.0 version, windows form, we are using readonly datagrid. for this grid if user selects any cell and right click then windows context menu i.e. cut, copy, paste... is displaying.
Now user is selecting some other cells and try to paste then in rowheader it is dispalying edit icon. We don't want this edit icon should be display at rowheader but context menu should be display.
Your help is greatly appreciated.
Thanks & Regards,
Kumar
|
|
|
|
|
Hi,
I am doing an application that is using webservice & displaying data.So every 30 seconds the application will call webservice, I use system.Threading.Timer it is working fine.CPU usage is very less (maximum 30).I got an additional task to play video files.So it will be maximum 8 video in a screen (video files located in local system) & very 30 seconds according to data from ws video file will change.I write the code like this.In timer callback event I am Executing 2 functions
[Code]
System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetNextPage), state); // going 2 next page, in a page displaying 8 rows
System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetNextVideo), state); // displaying corresponding video
//in delegate of video I put the below code
wmp = (AxWMPLib.AxWindowsMediaPlayer)Arrctrl[0]; //Find the control bcos adding at runtime
thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(PlayCurrentWMP)); //PlayCurrentWMP is assign the URL & play
thread.Priority = System.Threading.ThreadPriority.Lowest;
thread.IsBackground = true;
thread.Start(wmp);
[/Code]
Please advice what is wrong in my coding. Thanks in advance
|
|
|
|
|
Cant tell from what you told us.
Some ideas/suggestions:
- maybe movie takes more than 30 seconds
- maybe you keep adding threads
- add a thread counter; increment it at the beginning of the threaded method (PlayCurWMP)
and decrement it at the end; show it all the time
- maybe you are exhausting the ThreadPool
- I would add logging in all relevant parts, so you get a history line of what is going
on;
- you even may try to correlate your CPU load (observed, or obtained programmatically) with
that time line.
|
|
|
|
|
hi,
Thanks for the reply.When I start the application I am adding control runtime.If I try to play the movie suddenly CPU usage become 100% & the application runs very slowly.
Can you suggest is it AxWMPLib.AxWindowsMediaPlayer taking the memory?
Every 30 seconds I am updating the screen using Threading.Timer & delegates.So id the screen changes I need to change all the videos.
Can you pls help me How I play video with out affecting my screen display & reduce the CPU usage?I am not good in threading.Please give the code...
Thanks a lot..
|
|
|
|
|
I dont have code for this.
I gave you suggestions and ideas, that will be it.
One more suggestion: make sure you dont have a thread touch a control it did not create
(on old .NET, before 2.0) that may cause almost any anomaly; on .NET >= 2.0 it should
give an InvalidOperationException with some cross-thread remark in the message.
Thats all I can do for you.
|
|
|
|
|
I developed a C# windows application in .net2003. What i need is how to start that application along with the windows. Is there any setting in the code to achieve this.
I am grateful if any one helps me.
Thanks in Advance.
Ramu
|
|
|
|
|
You can put the exe or Shortcut of the exe in windows startup
C:\Documents and Settings\Your Computer Name\Start Menu\Programs\Startup
Thanks
|
|
|
|
|
|
Ramu.M wrote: how to start that application along with the windows
Do you mean when Windows starts or when a user logs in? In the former case, you'll need to create a Windows service; for the latter, see this[^] link.
/ravi
|
|
|
|
|
Thank you very much for providing an excellent link.
Once again Thank You.
Ramu
|
|
|
|
|
Hi everybody,
I have a quick question about listboxes. I have a project where I want to take a string, and see if a Listbox full of substrings has any matches in it. So if the big string is "abcdefg" and the listbox has "arq", "bcd" and "qrs", then the answer is YES. For example:
//listbox is populated with "chunks" of data
string xyz;
foreach(string in the listbox)
{
//does this listbox string exist somewhere in the big string xyz?
if(true)
{
//do something
}
}
I have no idea how to do this. It seems simple enough but there doesn't seem to be the right method out there.
Thanks for your time,
Michael Fritzius
|
|
|
|
|
you iterate over the items collection of the listbox, and you use methods on the string class to see if one string contains another.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Michael,
Something like this...
foreach (string item in sourceString)
if (sourceString.Contains(item))
{
}
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
I dont think your example makes much sense, unless you somehow specify the minimum
length required for the matching substring.
Without it, every string contains "" (that is the empty string)
and I expect most strings contain a vowel such as "e" or "a"
If that is nevertheless what you really want, then do what the other replies
indicate, but put it all in one more loop in which you generate all the valid
substrings of your "big string". You might want to fill a list with these
substrings once, any way you see fit.
|
|
|
|
|
Got it.
Here's how it worked out:
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsApplication1<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
foreach(string item in listBox1.Items)<br />
{<br />
if (item.ToString().Contains(textBox1.Text))<br />
{<br />
textBox2.Text += ("Substring found in entry " + item.ToString() + "\r\n");<br />
}<br />
<br />
}<br />
}<br />
}<br />
}<br />
Thanks for your help guys, something about all three replies kind of "came together" for me
|
|
|
|
|
Dear All,
Is there any way that we can check if a specific variable is declared or not
Thank you!
M. Nauman Yousuf
"Mess with the Best, Die like the rest"
|
|
|
|
|
M. Nauman Yousuf wrote: Is there any way that we can check if a specific variable is declared or not
Perhaps using reflection.
However, if a solution contains the words "using reflection", it's usually an indication that you are thinking backwards somehow. What is it that you are trying to accomplish really?
---
single minded; short sighted; long gone;
|
|
|
|
|
I am designing a simple display / edit page, by passing a variable in the url of that page. On page load i check for the variable and populate the edit more form accordingly.
But always get an error if the variable is not present.
A simple technique of try catch would be my final option if no other alternative is available
Thank you!
M. Nauamn Yousuf
"Mess with the Best, Die like the rest"
|
|
|
|