|
<webmethod()>
Public Function countryinfo(ByVal name As String) As String()
' Dim count As Integer = 10
Dim ct As String = "select name from XXXXX where name like '" & Replace(name, "'", "''") & "%' ORDER BY name asc"
Dim ds As DataSet = all result i put in dataset
Dim k As Integer = ds.Tables(0).Rows.Count
Dim items(k) As String
Dim dr As DataRow
Dim i As Integer = 0
For Each dr In ds.Tables(0).Rows
items.SetValue(dr("name").ToString(), i)
i = i + 1
Next
Return items
End Function
i provide the break point but it dont call that function...wht to do now?
modified on Wednesday, December 16, 2009 4:34 AM
|
|
|
|
|
I have to validate 1 textbox and 1 FileUpload control on my page. I have make the user to fill at least one of them, i.e. both of them can not be left blank. Do anybody have any idea about how can use the CompareValidator for this.
Thank you.
|
|
|
|
|
anada8886 wrote: I have to validate 1 textbox and 1 FileUpload control on my page
Use customvalidator and javascript function..!
or use server side validation..!
anada8886 wrote: can use the CompareValidator for this.
why would you go for compare validator..!
Is it manadatory..?
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Thanks for the reply.
I have already tried using Custom validator with Javascript but it is giving me some JS error. And it is giving that error only for Custom validator,that is why I thought if it can be done using CompareValidator.
Secondly ,I want it in client side only,it should not go to server side.
|
|
|
|
|
anada8886 wrote: I thought if it can be done using CompareValidator.
the answer is no ..!You cant do it with comparevalidator..!
the compare validator checks if both the values are identical or not ..! thts it..!
<script language ="javascript" type ="text/javascript" >
function CheckEmpty() {
var fromaddress = document.getElementById('<%= TextBox1.ClientID %>').value;
var fromaddress1 = document.getElementById('<%= FileUpload1.ClientID %>').value;
if (fromaddress=="" && fromaddress1=="") {
alert("Should not be empty");
}
}
</script>
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="should not be blank..!"
ClientValidationFunction="CheckEmpty"></asp:CustomValidator>
</div>
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Thanks for your reply sir, but as I told you using CustomValidator is giving me error - 'Microsoft JScript runtime error: Object required',in the method WebForm_RemoveClassName(element, className) of WebResource.axd.
|
|
|
|
|
anada8886 wrote: Thanks for your reply sir
You no need to call any one as sir in here. ..!
then remove the custom validator..!and add the function for button click client validation..! as shown below..! Check OnClientClick="CheckEmpty();"
<asp:Button ID="Button1" runat="server" OnClientClick="CheckEmpty();" Text="Button" />
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hey thanks, it worked !!!
|
|
|
|
|
anada8886 wrote: Hey thanks, it worked !!!
Any Time..!
Here it is a tradition to mark it as answer if it helps..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Yes ,I know but I couldn't find any way here to mark your comment as 'Answer'.
|
|
|
|
|
Hi,
I am working on a Asp.net application. In this I have a gridview with autogenerate columns and data bind using linq in code behind. In this gridview I need to edit the cell on which I click. For example I have 5 columns in my gridview and I want to edit only 2,3,4 columns in the gridview and 1,5 columns are not editable.
If anyone have any idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
Just Disabled the cell during GridView1_RowDataBound Event of GridView.
like
e.Row.Cells(3).Enabled = False
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi
Could any help me to inform which one is best ASP.NET Forum software and which one is the best ASP.NET CMS.
Thanks
Shahdat
shahdat
|
|
|
|
|
That's depends upon your requirement. You can have a look into Sharepoint or DotNetNuke
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks Abhijit Jana, for ur valuable response
I work with a real state site of a Singapore Real State company.He want a forum using vBulletin(PHP). I offered him I will be capable to build forum module using ASP.NET forum software. Now what can I do?
I also want a best ASP.NET CMS for building Social Networking site.
Could you help me more?
Happy
Shahdat
shahdat
|
|
|
|
|
As I suggested you, Just have a look into DNN or Sharepoint. and you search on google for ASP.NET CMS, you will find many solution. But what to choose that's depends on your requirement and your clients
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
Ok
Now I aspect the answer of another part of the my problem. You may know Forum module of a site may be developed using vBulletin( for PHP and Mysql). I want to know which tool/software I can user intense of vBulletin as a web developer of ASP.NET?
Plz feel free to help me.
shahdat
shahdat
|
|
|
|
|
MD. SHAHDAT HOSAIN wrote: Plz feel free to help me.
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Since you mentioned that you need to build Social Networking site I would like to recommend you to try Kentico CMS for ASP.NET:
http://www.kentico.com/free-cms-asp-net.aspx[^]
Which covers all the needed functionality for building community site.
|
|
|
|
|
Hi all Peoples,
I am doing a web application in which i am adding the labels to the
panels as a results of the search.
its working fine..
my question here is,,
i need to do paging the panel like after 20 labels in the first page i need to add remaining(20) and ..to the second page in the panel..
can you please help me regarding the same..
Thanks in advance..
hema.
|
|
|
|
|
Hi,
Either go for Panel Paging You have to use the Repeter Control and Data List.Hope this will help
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Repeater control , data list means i dont understand.. can u help me more please?
|
|
|
|
|
Hema Bairavan wrote: Repeater control , data list means i dont understand.. can u help me more please?
He is asking for use Repeater Control rather than use Label and bind it every time with panel.
Here is few good example of repeater control with Paging.
Ref1[^]
Ref 2[^]
This may help you !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
hi all
i have created some xaml page using kaxaml software.
now i want to add these page xaml file in aspx page.
how to do this??
i have one more question
i have created a button and textbox in xaml file.
how can i use that button click event in my aspx.vb page.
any help or suggestion ??
jagwinder walia
One person's data is another person's program.
--J.Walia
|
|
|
|