|
jagadeeshkumar2106 wrote: is not possible with check boxes
I don't want to say it's impossible.. but if you are using checkedboxes instead of radiobutton for your case, the user might feel confused. That's why I suggested you to use radiobutton.
If you want to get the example, you can check-out the link..
As this article RadioButtons inside a GridView control[^] mentioned, you can use HTML radio button instead of Server-side control if you want the user to select the only one radiobutton..
OR
Adding a GridView Column of Radio Buttons[^]
OR
http://forums.asp.net/p/1050958/1484724.aspx[^]
<br />
protected void rbSelector_CheckedChanged(object sender, System.EventArgs e)<br />
{<br />
foreach (GridViewRow oldrow in GridView1.Rows)<br />
{<br />
((RadioButton)oldrow.FindControl("rbSelector")).Checked = false;<br />
}<br />
<br />
RadioButton rb = (RadioButton)sender;<br />
GridViewRow row = (GridViewRow)rb.NamingContainer;<br />
((RadioButton)row.FindControl("rbSelector")).Checked = true;<br />
}
Hope it helps..
|
|
|
|
|
sir wat u gave is working fine and thanks . if u dont mind my application has check boxes it so will u plz help in this regard.
|
|
|
|
|
Is there a way for me to create a new thread with ASP.Net using C#?
|
|
|
|
|
Either spawn a new thread by creating a new instance of the System.Threading.Thread class, or assign work to a thread from the threadpool by calling System.Threading.ThreadPool.QueueUserWorkItem .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
The real question is, why do you want to ? I mean, there are limited ways in which that can help in ASP.NET because the class is generated on a postback and is gone when the page is sent back.
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 guys ! I'm sorta new to web development, well not with the coding part, I want to develop my first full website (ASP.NET 2.0, C# 2005) ... I'm looking for some material that can help me in doing that, some tips someone give some links of for example a full website so i can get some clues on how to develop my site,
I appreciate that !!!
Mr.K
modified on Friday, January 04, 2008 3:01:08 PM
|
|
|
|
|
I'd recommend buying a book on ASP.NET. Beyond that, I'm not sure what you're asking. You know how to code, but you don't know HTML/ASP.NET ? You've written pages before but somehow think there's more to know when writing the whole site ?
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 )
|
|
|
|
|
Polish your technical skills with a full day of free, live learning sessions near you for developers and IT Pros. Learn hands-on skills and swap juicy stories at MSDN Events[^].
See what’s new in Internet Information Services [^]and why IIS7 is Microsoft’s most extensible, manageable and secure web platform to date. You’ll learn how to extend Application Services from ASP.NET [^] and how to consume them from a variety of clients. We’re also tackling some of the toughest Web security threats and clueing you in to the top counter measures.Register today[^] to strengthen your security skills at these lively events in your local area. For information about the event, including locations, dates and times, see MSDN Events[^].
Learn more about Microsoft emerging techologies[^].
|
|
|
|
|
hello,
after a client make a payment "paypal" sends a "form" that include all the variables (for ex: payment_date,transaction_id ...), the form is sent to a specific URL which is my server (for ex: http://66.25.123.112/paypal/request.aspx)
how to read the form so the variables appear in my page?which classes or method should i use?
please if someone could help ASAP
THANK YOU A LOT
|
|
|
|
|
Which method of paypal u r using?
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Friday, January 04, 2008 10:04:07 AM
|
|
|
|
|
dear rahul;
the "BUY now" method , but the problem is how to read from the sent message, as i said before, they sen all the information to a URL i already specified in "notify_url" function (according to paypal)
thank you for your help
|
|
|
|
|
Here is the code I use to post a request to Authorize and get a response. I don't think any of it is specific to them, just plug in the right variables.
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create((transaction.TestRequest) ? testurl : url);
objRequest.AuthenticationLevel = System.Net.Security.AuthenticationLevel.MutualAuthRequired;
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";
try
{
myWriter = new StreamWriter(objRequest.GetRequestStream());
myWriter.Write(strPost);
}
catch (Exception e)
{
return null;
}
finally
{
if (myWriter != null)
myWriter.Close();
}
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 )
|
|
|
|
|
dear christian
i already send my variables while clicking "Buy Now" button the problem is when they send back IPN to my url(ex:55.62.65.23/paypal/anything.aspx)
the anything.aspx page should read the sent variables (ex:transaction_id...) so what classes or method read and store it in my database or XML file
thanks a lot
bachirium
|
|
|
|
|
HI
U r sending all the required parameter to paypal via query string or
by hidden field. If u r payment got successed then user will be
redirected to success_url. Then it will send you all the values
via query string. U can read this values as follows.
dim tid as string = Request.QueryString.Get("txn_id")<br />
dim amt as string = Request.QueryString.Get("payment_gross")
Paypal will send to all information about to payer and the merchant.
you can read all the values through query string.
Regards.
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
|
Hi All,
I created listener for POST message from client as a simple web page and process that message in Page_Load method. If I use url for posting message to my listener with explicit web page name http://myserver/formhandler/listener.aspx it works without error. But my clients will need to post message using url without mentioning page name like this http://myserver/formhandler. In IIS for formhandler virtual directory I set default document as listener.aspx. And now my issue starts: server responds every time with error 405 Method not allowed. I set properly mapping for aspx extension in configuration to allow POST method.
I would greatly appreciate if anyone can point me what else I have to set to overcome this issue.
Thank you very much in advance,
Roman
|
|
|
|
|
Hi,
I'am ASP.NET 2005 and I am trying to check size of an upload file and limit user if file size>1000kb? I success to limit user for upload only pictures, as following my code.
I need the code in Javascript, I already did it at server side validation.
<script language="javascript" type="text/javascript">
function onSubmitForm(source,arguments)
{
var formDOMObj = document.getElementById("ctl00_ContentPlaceHolder1_UserDataFormView_FileUpload1");
var vld=document.getElementById('ctl00_ContentPlaceHolder1_UserDataFormView_VldUpload1');
var isvalid=false; //Init
if (formDOMObj.value != "")
{
//File type
var strLocation = formDOMObj.value;
var strFile = strLocation.split(".");
var arrFileExtension = new Array(7)
arrFileExtension[0] = "JPG";
arrFileExtension[1] = "JPEG";
arrFileExtension[2] = "GIF";
arrFileExtension[3] = "BMP";
arrFileExtension[4] = "TIF";
arrFileExtension[5] = "TIFF";
arrFileExtension[6] = "PNG";
var len = arrFileExtension.length;
var x=0;
for (x=0; x<len; x++)
{
if (strFile[strFile.length - 1].toUpperCase() == arrFileExtension[x].toUpperCase())
isvalid = true;
}
if (isvalid==false)
{
vld.errormessage="jpg jpeg png gif bmp tif tiff ";
arguments.IsValid = false;
return;
}
}
//Now check file size
??????????
arguments.IsValid = isvalid;
}
Please help
|
|
|
|
|
I think you probably need to use Server-side script for that.. In server-side, you can use this code FileUpload.PostedFile.ContentLength to get the size of file..
|
|
|
|
|
Thanks but as I said I already did it at server side. This is not the bet thing because before server side validation the posatback clear the fileupload textbox
Shay Noy
|
|
|
|
|
Hi,
I agree. Use server side instead, you could store the contents of the textbox in a variable and then you code it to put that variable into the textbox.
Hope it was useful.
Lloyd J. Atkinson
|
|
|
|
|
Thanks, can you show me how to save in temporary variable and to fill the FileUpload textbox.
Shay Noy
|
|
|
|
|
Hi,
Im sorry but I tried to use it the way I had suggested but I didnt realise that the FileName property of the component was readonly, I tried:
Partial Class _Default
Inherits System.Web.UI.Page
Dim TempVar As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
FileUpload1.FileName = (FileUpload1.PostedFile.ToString)
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
TempVar = FileUpload1.PostedFile.FileName.ToString
End Sub
End Class
But then it complained and said: "Property 'FileName' is 'Readonly'."
Well, I tried but couldnt figure out how to do it, sorry.
Lloyd A.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" -ALbert Einstein
|
|
|
|
|
|
You can't check the file size using Javascript, you can't access the file system of the client computer.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I can something else. I can onchange event of the FileUpload object display the selected image on image object (all of this in client side) and then check the size of the object. The problem is that I am not succeed to display the picture. What is the prblem?
See my code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript">
function upload() {
var oThumbnail = document.getElementById("imgThumbnail");
filename = document.getElementById('myfile').value;
oThumbnail.src = "file:///" + escape(filename).replace(/%5C/gi,'/').replace(/%3A/gi,':');
oThumbnail = null;
}
function getSize(oImg)
{
if (oImg.fileSize >-1) {
document.getElementById('sizespan').innerHTML = oImg.fileSize;
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
File: <input id="myfile" name="datafile" type="file" size="40" onchange="upload();" />
</form>
<div id="sizespan"></div>
<div id="thumbnail">
<img id="imgThumbnail" src="" alt="place holder" width="50" height="50" onload="getSize(this);"/>
</div>
</body>
</html>
What 's wrong?
Thanks
Shay Noy
|
|
|
|