|
Hi All,
I have a string. I want to put all characters in an arraylist. How to do it?
Help me.
Regards,
Jegastar
|
|
|
|
|
Use the ToCharArray method to get the string as an array of characters, then use that array in the call to the constructor when you create the ArrayList.
---
b { font-weight: normal; }
|
|
|
|
|
This'll float ya boat im sure:
a string is a list, it is simply a list of char 's. You can access them in much the same way as any list
string myString = "Hello World";<br />
char char0 = myString[0];
char char3 = myString[3];
Also, as noted above you can use the ToCharArray() to get it as a simpler array to use elsewhere.
|
|
|
|
|
It is working!!!!!!!!Thank you.
|
|
|
|
|
Hi ALl
I have one runtime checkbox.
I have created one protected function for checkbox.
But how to call this function on checkbox?
Thanks
monika
|
|
|
|
|
just make clear what u want to do.
Dev
|
|
|
|
|
Hi
I have datagrid which is created at runtime.
I add checkboxes in datagrid also at runtime.
now i want event when i click on checkbox.
i have code like
protected void OnChangeHandler(object sender,EventArgs e)
{
// Handle the event...
}
dim chk as new checkbox
chk.Id="chk"
chk.CheckedChanged += new EventHandler(OnChangeHandler);
but this code is not working in asp.net with vb.net.I think this code is in c#.
How can i write this code in asp.net with vb.net?
I hope now u got my question.
Thanks
monika
|
|
|
|
|
AddHandler chk.CheckedChanged, AddressOf OnChangeHandler
public sub OnChangeHandler(object sender,EventArgs e)
...
..
..
end sub
|
|
|
|
|
Hi
Thanks for kindly response.I have written as u say but it's not working.
I give u code if possible check it.
Hi
I have one datagrid name as dg_unit on a form.
I am adding a new datagrid name as dg_diagnosis at runtime in dg_unit datagrid.
I am adding a new checkbox control at runtime in dg_diagnosis grid.
i am adding event handler to checkboxes.But event is not fired.
I give a code which is written by me.
If any correction or missing pls suggest me.
For Each ditem In dg_diagnosis.Items
Dim str As String = ditem.Cells(1).Text
Dim chk As New CheckBox
chk.ID = "chk"
ditem.Cells(0).Controls.Add(chk)
AddHandler chk.CheckedChanged, AddressOf chk_CheckedChanged
Next
Public Sub chk_CheckedChanged(ByVal sende As Object, ByVal e As System.EventArgs) Response.Write("hi")
End Sub
Thanks
monika
|
|
|
|
|
You can also check Google for the Microsoft Paste As VB.NET extension.
|
|
|
|
|
Hi All,
I My Asp.net web application(VB .net as Code behind)..
I need to Validate the Name Textbox, Phone number, Mobile Number and Address Textboxes..
In Name Text box i need to validate String with Spaces..
In Address Textbox i need to validate String with Space and Special Charactors..
In Phone and Mobile number I need to Accept Numbers with Spaces..
Can any one provide me the Custom Regular Expressions..
Thanks in Advance
|
|
|
|
|
|
You need a regex tutorial. There are a couple on Codeproject.
|
|
|
|
|
Hi Friends,
Is it possible to link javascript with asp.net form. If the answer is yes , how will I make a linke between javascript and c# code on a ASP.NET form.
-PHIJO MATHEW PHILIP.
|
|
|
|
|
If you mean how to use a js file in an aspx, it's the same as it's always been - use a tag.
If you mean can a js file call an aspx method, then yes - but only through Ajax...the other way round (aspx "calling" js functions), then google for RegisterClientScriptBlock / RegisterStartupScript
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Of course, yes.
This is the javascript.
function sample(fieldId, title)
{
if (title == "")
title = "Long Description";
document.Form1.submit();
}
Code behind:
this.btnSubmit.Attributes.Add("OnClick", "javascript:sample()");
rmr
rmr
|
|
|
|
|
Hi friends
i want to redirect user to paypal site on button click events.
my code is
string str = "";
str = "http://www.paypal.com/cgi-bin/webscr";
str &= "&cmd=_xclick";
str &= "&business=xyz@xyz.com";
.
.
.
.
.
.
.
.
Response.Redirect(str);
NOT FOUND
thanks
Pathan
-- modified at 7:43 Thursday 30th November, 2006
|
|
|
|
|
I suggest you re-read what you pasted
you are redirecting to the value of strGO , but you are filling out the paypal url in a variable called str
That code is saying Response.Redirect(""); so no wonder it's not working
HTH
|
|
|
|
|
What do you mean by "NOT FOUND"? Is this an error message? If so, where and how is it displayed? Isn't there any more information?
---
b { font-weight: normal; }
|
|
|
|
|
Hi
i have done it.
thanks for ur reply
Pathan
|
|
|
|
|
Look at the url you are trying to redirect to....
http://www.paypal.com/cgi-bin/webscr&cmd=_xclick&business=xyz@xyz.com
It should be:
http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=xyz@xyz.com
|
|
|
|
|
Why are you using ampersands?
Since you are using line terminators (;), shouldn't they be += ?
|
|
|
|
|
Hai to all,
Here i am using two grids in my form.My probelm with them is,
I am using checkbox to select multiple rows and then i need to diplay them in other 2nd grid(selectd rows).
How to do this ??,and in the second grid i need to add a new column for each row which was selectd from the first grid.
Give me some solution
Thanks in advance
kissy
|
|
|
|
|
You pretty much laid it out. You iterate through the original grid to check the checkbox status. If it's selected, add the item to another list (or datatable), then bind the new list/table to the 2nd grid.
|
|
|
|
|
I am using <asp:fileupload> to upload a file in a page. i am selecting some file in this object. but at every post back the content of the fileupload is gone. how to retain it. Please Help.
Thanks in Advance
Regards,
Prya
|
|
|
|