|
i want to display the results like search enignes result in asp.net
like
first column with hyperlink
second column text
with each page 10 results
your's subbu
|
|
|
|
|
ncsubbu wrote: i want to display the results like search enignes result in asp.net
I want to own Google.
ncsubbu wrote: first column with hyperlink
second column text
with each page 10 results
Well, this is quite simple and you can do in number of ways...
1.) Create a table and display the results there with the help of style sheets.
2.) Create a user control and load it for every serach result or for every 10 results.
Hope this helps...
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i have posted 3 questions tommorrow if anybody has the answer then plz let me know,its vry urgent,one i need is email domain validation,compatibility of uploaded photo in IE7 & IE6(as it is not seen in IE7) & storing datetime in sql from asp.net.The codes which i am using are mentioned in my 2morrows post,plz plz plz answer,i really need that codes urgently.
thanks in advance
Maniiiiiiiiiiiiiii
|
|
|
|
|
for your domain name validation in E-mail ...
I think you can extract the domain name from the email address and validate against your domain name .try to use the substring functions available . extract the sub-string after @ from the e-mail (if it is e-mail to be validated) and validate it with your domain name.
I feel this is a better way out .
For eg. the email is abc@xyz.com and your domain name is www.xyz.com ,extract xyz.com from e-mail and validate it with the domain name .
Kovuru Sreedhar
|
|
|
|
|
actually sir i have to validate not only for my domain but also yahoo,gmail etc. than wat will be d solution...
thanks for ur consideration...
Maniiiiiiiiiiiiiii
|
|
|
|
|
in that case make an array of all those required domains and validate on that array elements of omain names.I hope this will get you some idea.
Kovuru Sreedhar
|
|
|
|
|
i have two string "a" and "b"
i want to concatenate string c = "a" "b" in asp.net
my code is
string p1 = "'" + b + '"' +' ';
string p2 = "'" + c + '"' +' ';
what result is coming c = "\p1\"\"p2";
what i want to result c = "p1" "p2";
how it will possible.
|
|
|
|
|
Your same last post is still on this page and you did not have patience to have a look at that.
How do you think that a new post will get you an answer.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hello any one may please help me!
is it not possible to get the full path using FileUpload control FileName property? I am asking this because when selected a file for uploading in C drive (C:\filename.ext) and when I click on send mail it shows an error saying that the file is not available in the path "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\...".
thanks in advance
Kovuru Sreedhar
|
|
|
|
|
Re Post...
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
so what if can answer answer it .right .
Kovuru Sreedhar
|
|
|
|
|
System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName);
|
|
|
|
|
thanks for your valuable help.It really solved my problem.
Kovuru Sreedhar
|
|
|
|
|
Hi sorry for once again posting this msg,
still i didnt get answer of this error...,
I am using listview control...,
In that based on my checkbox check row 2 value i want to get..,
So i used this code:
foreach (ListViewItem lvi in lvEmployee.Items)
{
CheckBox chk = (CheckBox)lvi.FindControl("ICheck");
if (chk.Checked==true)
{
getchoice11 += "'" + lvi[2].ToString().Trim() + ",";
}
}
But i am getting error as :
"Cannot apply indexing with [] to an expression of type 'System.Web.UI.WebControls.ListViewItem'"
In this line:
getchoice11 += "'" + lvi[2].ToString().Trim() + ",";
whats wrong in that code?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: Hi sorry for once again posting this msg,
Still you did it...
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
modified on Saturday, August 30, 2008 2:36 AM
|
|
|
|
|
That object does not contain an indexer property, you can't use the [] expression with it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Whenever I debug an ASP .NET Web Application in Visual Studio 2005, IE 7's menu bar, and toolbar disappear. The only information there is the title bar and the website. Anything you might know to check? If I just open IE7 just to browse, the whole window display of IE7 is there, buttons, menu and toolbars.
|
|
|
|
|
In my aspx page, I have two tabs. I have written a javascript in such a way that if the user clicks on first tab, it will go to the previous page visited and that will be the required behaviour which is working perfectly fine.
Sometimes the previous history will not be available. In the sense, there is an option that the user can directly visit the page by making changes in the url without going to login and home page. In such a case, I need to show the user the home page. How will I do that? Can anybody provides any logic to me for this?
I have used the following JS code for going to previous page.
function UltraWebTabMain_Click(oWebTab,oTab,oEvent)
{
var wTab = igtab_getTabById("ctl00_TabControl1_UltraWebTab1");
if(wTab!=null)
{
var tab = wTab.getSelectedTab();
if(tab!=null)
{
var tabtext = tab.getText();
var FirstTab = 0;
if ((oTab.Key == "Search") && (tabtext != "Search"))
{
window.history.go(-1);
wTab.setSelectedIndex(FirstTab);
}
}
}
}
Can I do any modification to the above JS code so that the user should be directed to Home Page if history not present? Can anybody provide any help please?
Thanks
Meeram395
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: Can anybody provides any logic to me for this?
this is strange...most of the times I see problem in implementing the logic, but here you are asking for the logic...
meeram395 wrote: Can I do any modification to the above JS code so that the user should be directed to Home Page if history not present? Can anybody provide any help please?
You can do whatever you want. After all its your application.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
How do you dynamically add a control (e.g. a textbox) to a ASP .NET content page in VS 2008.
this.controls.add(new TextBox()); Does not work.
Neither does
Content cnt = (Content)this.FindControl("Content1");
cnt.Controls.Add(new TextBox());
|
|
|
|
|
Hi All,
Using Reflection I am trying to get properties of a class I have created. I am doing this, so I do not have to make coding changes with any additional property added to the class.
Getting the properties list is working but I am having trouble reading the value of the property. Not sure how and what parameters to be passed for GetValue funtion.
Could anybody please help me with GetValue statement?
Thanks in Advance!
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Members As Collection = Family.Members()
For i As Integer = 1 To sqlColl.Count
GetMemberInfo()
Next
End Sub
Sub GetMemberInfo()
Dim oMember As New Member
Dim objType As Type = oMember.GetType()
Dim sName As String, svalue As Object
'Dim properties As System.Reflection.PropertyInfo() = objType.GetProperties()
For Each srcProperty As System.Reflection.PropertyInfo In objType.GetProperties()
sName = srcProperty.Name
svalue = srcProperty.GetValue(oMember , Nothing)
Response.Write(i & " - " & sName & (svalue Is Nothing) & "<br />")
Next
End Sub
'Classes are like
Public Class Member
Private _name As String
Private _age As Integer
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property
Public Property Age() As Integer
Get
Return _age
End Get
Set(ByVal value As Integer
_age = value
End Set
End Property
End Class
Public Class Family
Private Shared MemberCollection As Collection = Nothing
Shared Sub AddMember(ByVal Info As Member)
Dim thisFamily As New Family
thisFamily.AddToCollection(Info)
End Sub
Private Sub AddToCollection(ByVal Info As Member)
If MemberCollection Is Nothing Then MemberCollection = New Collection
MemberCollection .Add(Info)
End Sub
Shared Function Members() As Collection
Dim thisFamily As New Family
Return thisFamily.getMembersColl()
End Function
Private Function getMembersColl() As Collection
Return MemberCollection
End Function
Shared Function getCount() As Integer
Return Members.Count
End Class
|
|
|
|
|
Hi,
I am getting the following error, when i am accessing my web application
http://localhost/MyApplication/Login.aspx
Please suggest me on this.
Server Error in '/MyApplication' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Access is denied: 'MyApplication'.
Source Error:
Line 256: <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 257: <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 258: <add assembly="*"/>
Line 259: </assemblies>
Line 260:
Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 258
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MyApplication' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = MyApplication
(Partial)
LOG: Appbase = file:///C:/AppFolder/MyApplication
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: MyApplication
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/MyApplication/889d1a60/ebda7ec6/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/MyApplication/889d1a60/ebda7ec6/MyApplication/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/AppFolder/MyApplication/bin/MyApplication.DLL.
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
|
|
|
|
|
I have a text file and i want to Split the file into mulitple files based off the city and then create new files with the city name.
I am able to read the file and also chnaged the semi colon to a comma in the file. How do i split into multiple files based on city and then create new ones based upon city names
This is how the text file looks like(just a junk data)
FirstName;LastName;DOB;City;State;Zip
Suzy;Adams;05/15/1977;Salt Lake City;UT;84054
Brady;Broom;03/16/1978;Provo;UT;84054
Andrew;Packard;02/06/1980;Salt Lake City;UT;84034
Ralph;Vunderly;01/15/1983;Provo;UT;84023
Thi si my code looks like
Imports System
Imports System.IO
Imports System.Collections
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim objReader As New StreamReader("c:\test.txt")
Dim sLine As String = ""
Dim arrText As New ArrayList()
Do
sLine = objReader.ReadLine()
If Not sLine Is Nothing Then
sLine = Replace(sLine, ";", ",")
arrText.Add(sLine)
End If
Loop Until sLine Is Nothing
objReader.Close()
For Each sLine In arrText
' Console.WriteLine(sLine)
' MsgBox(sLine)
'Response.Write(sLine)
Dim furst As String = arrText(0)
Response.Write(furst)
Next
'Response.Write(sLine)
Response.Write(furst)
Console.ReadLine()
End Sub
End Class
|
|
|
|
|
Create the new file, write data to it, save it. Rinse and repeat until you are done.
You can find plenty of sample code on how to do this on Google, just search file handling or files.
One trick with ASP.NET though, you have to give IUSR_[Machine Name] access to the folder you want to read/write files to.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
i have two string "a" and "b"
i want to concatenate string c = "a" "b" in asp.net
my code is
string p1 = "'" + b + '"' +' ';
string p2 = "'" + c + '"' +' ';
what result is coming c = "\p1\"\"p2";
what i want to result c = "p1" "p2";
how it will possible.
|
|
|
|