« first day (3 days earlier)    last day (14 days later) » 

10:27 AM
hi
 
nad
hello
how are u Mate
?
 
I'm fine.
you ?
 
nad
Relaxed after that query resolved.. :P
 
Now it is hitting the method ?
 
nad
so here We go..
Nope, I changed the logic of doing
what I did is
I took one button
<input type="button" id="BtnGo" class="button" value="Go" runat="server" onclick="funShortcuts()"
style="height: 21px; width: 40px;" />
and called the function
which is
my main issue was to geneate the HidAttachID
so i got it from here
function funShortcuts() {
var str_mkey = "";

var MkeyVal = '<%= Request.QueryString["key"] %>';

if (MkeyVal == "10") {
var r1 = confirm('Open Attachment form');

if (MkeyVal > 0) {
if (r1 == true) {
str_mkey = "'" + MkeyVal + "'";
}
else {
str_mkey = "'" + MkeyVal + "'";
}

var returnPara = window.showModalDialog("../PreSales/Transactions/FrmCrm_File_Attachment.aspx?Entity='XXACL_PN_PARTY_INFO','XXACL_PN_EXPENSE_INFO','XXACL_PN_VIEW_DATA_INFO'&mkey=" + MkeyVal + "&User_Attach=N&userid=<%=Request.QueryString.Get("userid")%>", null, 'unadorned:yes;resizable:1;dialogWidth:800px;dialogHeight:
untill and unless users saves the form, he wont be able to attach the file
and when he saves the file, hidAttach is generated..
 
10:33 AM
interesting..
 
nad
yes.. my seniors suggested me to do this way
it was much simpler for me
 
But now it works with ajax ?
 
nad
no, same issue.. the method is not getting hit
 
nad
U can update your answer.. so that I can accept it
 
10:34 AM
I have no idea why it is not working..
 
nad
same here Mate
 
Beacause if will be working..then will be little steps to finish task.
I explained you.
 
nad
yes i know
 
So..What elements must to include in answer ?
 
nad
both HTML and js
which I gave above
 
10:37 AM
ok.
 
nad
let me know once u update the answer
 
Please have a look now.
 
nad
yes.. upvoted and accepted :)
 
nad
wc mate :)
if u are free.. can i ask u something on C#..
?
 
10:47 AM
sure
 
nad
I want to write a logic for Prime numbes
so what is the best easy way ?
 
Do you want to get prime numbers from a range ?
 
nad
Nope.. just a simple logic will do
 
ok
if you want to get first N prime number one efficient way is to use Eroatostene Sieve
 
nad
what is that??
that's really good
 
10:54 AM
I used it when I was in highschool.
 
nad
ok
but what if I want to write a small program for it
 
But if you want the shortest way I am making now a program and I will explain you how works algorithm.
 
nad
sure...
i will run and check also
 
Do you want a method with classes ?
 
nad
yes
and if any other simpler way is their
let me know
 
11:02 AM
class Prime
{
public int number { get; set; }
public Prime(int num)
{
number = num;
}
public bool isPrime()
{
if (number == 0 || number == 1)
return false;
for(int d = 2; d <= number / 2; d++)
{
if (number % d == 0)
return false;
}
return true;
}
}
class Program
{
static void Main(string[] args)
{
Console.Write("Give number: ");
int number =Convert.ToInt32(Console.ReadLine());
Prime prime = new Prime(number);
Console.WriteLine(prime.isPrime());
Console.ReadKey();
}
}
maybe photo is displaying better.
 
nad
excellent
let me test
what is the main thing for getting a prime number
?
 
So, the definition of the prime number is this: A Prime Number can be divided evenly only by 1, or itself. And it must be a whole number greater than 1.
 
nad
ok cool
 
So, if we find an divisor different from 1 and itself..then the number isn't prime
 
nad
yes
 
11:08 AM
We start search divisor from 2..because 1 is divisor of any number.
 
nad
yeah..
so first prime number will be 3
 
nad
ahhh
sorry
yes
2
Thanks Mate
 
You're welcome.
 
nad
i might something more
:P
ask*
 

« first day (3 days earlier)    last day (14 days later) »