|
Create another project for VB.NET and refer the DLL here in your C# application.
|
|
|
|
|
i'm using a js file in my webapplication like this
<script type="text/javascript" src="../ValInputs.js"></script>
it's working fine ..But user gives the js file name in url he can download the .js file..
how can I restrict the user to download the .js files..
|
|
|
|
|
It's not possible. Usually people used to write the entire JS in single line which makes it tough to read. I don't think that there is other way to protect this.
|
|
|
|
|
Hi,
I am doing Online Examination. I want to access the 10 records(Questions) randomally and these questions I want to disaply on the form one by one.
Because I design the form that contains the next and prev buttons.
If we click on next button then next question will be disaply and same for prev button previous question display.
Thank you,
sjs4u
|
|
|
|
|
You could use the System.Random class with a constant seed value. This will guarantee that the same random number sequence will be generated everytime.
Some semi-pseudo code:
int question_number = 0;
int.TryParse(Request["question_number"], out question_number);
int max_questions = 9;
int seed = 42;
System.Random rand = new System.Random( seed );
int random_question_index = 0;
for(int i = 0; i < question_number; i++)
random_question_index = rand.Next(0, max_questions);
Something like that might work. Your next and previous buttons just need to set "question_number" appropriately.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
for(int i = 0; i < question_number; i++)
{
random_question_index = rand.Next(0, max_questions);
}
Boya - Badana - Tadilat ve Tamirat Isleri Bir Yudum Kahve Molasi (Coffee) Dügün Nisan ve Gelinlik (wedding)
Google Reklamlarinizi Sadece Siz Yönetin Elektrik Proje Tesisat Projesi Çizimi Illere Göre Nakliyat Firmalari Istatistik
http://www.evdenevenakliyatbul.com
|
|
|
|
|
Sounds like rather than random records, you want to create a random sequence of records to view. The easy way to do this is to create an array of all possible record numbers, and then use a random number generator to pull numbers out of that sequence into a list.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi i use crystal repprts to create report, can i insert tables in the crystal report can i display the data with multiline pls help me
i want to display 4 records per page how to display 4 records i want to display the records in the following format
Rec1 Rec2
Rec3 Rec4
i try this format but in the record2 place display the Record1 again
pls help me to this format in CrytalReports very Urgent
modified on Tuesday, February 05, 2008 2:56:39 AM
|
|
|
|
|
I have a user control that I would like to popup on a webform. Is there a way to load a user control, or another aspx page into a ModalPopupExtender?
Thanks for any advice--code sample.
|
|
|
|
|
Hi,
'm using a GridView in my website. I want to display DateTime Values using the format "dd/MM/yy". The Problem is that my WebGrid displays some data correctly but not all of them
(Jan 30 2008) is displayed "01-01-08"
(Feb 04 2008) is displayed "02-04-08"
Some code snippets :
<asp:gridview id="invoicesGridView" ..../ ><br />
<br /><columns><br />
<br /><asp:boundfield datafield="CmdDate" headertext="Date" sortexpression="Date" DataFormatString="{0:dd/MM/yy}" HtmlEncode="False"> <br />
<br />....<br />
<br /></asp:boundfield>
Note : When I tried to set HtmlEncodeFormatString to "False", my web page returns the error message :
Type 'System.Web.UI.WebControls.BoundField' does not have a public property named 'HtmlEncodeFormatString' !!!
Thanks in advance.
Rédha.
modified on Monday, February 04, 2008 10:17:28 AM
|
|
|
|
|
have you check your data in your database that been bind to your gridview ?
i put the same code in with you in my project, and it works just fine
my code :
asp:boundfield headertext="Preferred Date to Call" datafield="CallPreferredDate" sortexpression="CallPreferredDate"
DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false"
itemstyle width="25%"
asp:boundfield
hope it helps
nb:what the heck in the worls, if i put some code in this text editor, my code will not be shown?
|
|
|
|
|
In my laptop, it works fine but the problem occured when I hosted it !!
I will Keep the default values set for the Date Column and use the RowDatabound Event, it should works !!
Thank You boku
NB. To display HTML Code, you have to disable the "Ignore HTML tags in this message (good for code snippets)" checkbox bellow the text editor !!
Rédha.
|
|
|
|
|
ooohhh ok.
but be careful if your laptop's regional settings is different with your servers. if that's happens, i may suggest, you can use CultureInfo class.
yes. you were right. i just know that when i posted it... :p
thank you too redha
|
|
|
|
|
Hi...
How to Exporting multiple GridView to multiple sheets in single excel file.
please help me.
Pradeep Reddy
|
|
|
|
|
Have you attempted to solve the problem yourself?
If not, why not?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi all,
I having a string like this
<INPUT onkeypress=ValidateTime() id=t2_2 onblur=validateBtime(document.Baco.t2_2) style="WIDTH: 50px\" maxLength=5 value=20:00 >
Now I want to replace the
value=20:00
with another value. How can I do this using Javascript.
Thanks
Dana
|
|
|
|
|
danasegaranea wrote: How can I do this using Javascript.
By writing a regular expression.
It's generally considered rude to ask someone to do your work for you without having made a serious attempt to solve the problem yourself. There are plenty of examples of regular expressions available on the web if you look for them. I suggest you go away and do some research.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I have a problem which i am facing in my chat application. I am working on asp.net 2.0 and C#. My problem is regarding a sound functionality. I have to provide a visitor with a functionality of ringing a bell on the visitor chat window page. So when the visitor rings the bell, it is supposed to ring on the operator's machine. Now i have the below mentioned code... This works fine on a local environment, but when i uploaded this to my server, it doesn't work...
the logic is as follows... i have 2 pages - the visitor chat window & the operator chat window...
When the visitor presses the bell icon on the visitor chat window page, i write his ID & Is Belled flag onto to an XML file.
Now on the operator side i check continuously for correct operator receiving the ringing. Then i am calling the sound function on my server. No plug ins are used...
string soundPath = "";
soundPath = "http://"+Request.ServerVariables["HTTP_HOST"]+"/images/LiveChatImages/ringout.wav";
System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
myPlayer.SoundLocation = soundPath;
myPlayer.Play();
i am using the soundplayer class in asp.net 2.0
another code i also tried with no success is below:
public void PlaySound()
{
string soundPath = "";
soundPath = http://"+Request.ServerVariables["HTTP_HOST"]+"/images/LiveChatImages/ringout.wav";
WSounds ws = new WSounds();
ws.Play(soundPath, ws.SND_FILENAME | ws.SND_ASYNC);
}
public class WSounds
{
[DllImport("WinMM.dll")]
public static extern bool PlaySound(string fname, int Mod, int flag);
// these are the SoundFlags we are using here, check mmsystem.h for more
public int SND_ASYNC = 0x0001; // play asynchronously
public int SND_FILENAME = 0x00020000; // use file name
public int SND_PURGE = 0x0040; // purge non-static events
public void Play(string fname, int SoundFlags)
{
PlaySound(fname, 0, SoundFlags);
}
}
Anybody can help me with my problem... both these codes are working in my local system ... but none work on the server. Can anybody point out where i am wrong?
Thanks & regards,
S.Dhanasekaran
dhansmani@gmail.com
|
|
|
|
|
S.Dhanasekaran wrote: This works fine on a local environment, but when i uploaded this to my server, it doesn't work...
This is always a sign that you're confusing what happens on the client and on the server.
S.Dhanasekaran wrote: string soundPath = "";
soundPath = http://"+Request.ServerVariables["HTTP_HOST"]+"/images/LiveChatImages/ringout.wav";
WSounds ws = new WSounds();
ws.Play(soundPath, ws.SND_FILENAME | ws.SND_ASYNC);
If you're doing it on the server, why not use a local path to the file ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
(That'll drive the people in the server room bat sh*t crazy if it has speakers, which could be fun!)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Google <bgsound> for IE and <embed> for FF, etc.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
We have a C# windows appilcation that sends out emails to our customers. We want to put some buttons in the content of the mail and when the users click on the buttons, we want to send a reply to some address. We are facing the following problem in this task:
1. In the emails that the customers receive, we are not able to trap the button click event. How to do this? We want to write the code in the button click to send mails to an address. How do we capture the button click event in the mail content?
Thanks in advance
RS
|
|
|
|
|
Can you send the mail in html format and just use a simple mailto:
I'd be surprised if you are able to 'automatically' send emails from an embedded script. There are some security issues there if you think about it.
|
|
|
|
|
I'm trying to use a control I've downloaded, the vbAccelerator IconComboBox[^], but I can't get it to appear in the Toolbox. On the General tab I open "Choose items...", browse to the dll, and select it. I click OK, and the dialogue closes but the control appears nowhere. If I do another "Choose Items..." I see the control is still checked, as if it should be in the Toolbox, but I can't find it anywhere,
|
|
|
|
|
i want remove all of items that are in dropdownlist with javascript. do any body know how can i do this?source of dropdownlist is database.
|
|
|
|