|
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.
|
|
|
|
|
Try this
string a="\"a\"";<br />
string b = "\"b\"";<br />
string c = a + b;
|
|
|
|
|
|
not possible !!!! its working !!!
my output is
"a""b"
now if you want
c="a""b"
then use
string d="c="+ c;<br />
response.write(d)
|
|
|
|
|
|
You are not clear about your problem . answer is given !!!!!
|
|
|
|
|
string a = "hello";
string b = "world!!!";
string str = string.Format("\"{0}\"\"{1}\"", a, b);
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
no dost same probleam create
i want to result
c = "a" "b"
only for this
|
|
|
|
|
I didnt understand....
you can use
c="a" + "b";
and get
c="ab"
or if you want c="a""b" then you can write
c="\"a\""+"\"b\"";
simple...
Abhishek Sur
Web Developer
|
|
|
|
|
i m getting same probleam plz implement practically in asp.net
|
|
|
|
|
i think he is confused himslef !!! he dont know what to do !!!
|
|
|
|
|
simple
i have two stirng
string s1 = "a";
string s2 = "b";
when concatenate both string then show result
c = s1 + s2;
c = "\"a\"\"b\""
but i want to result
c = "a""b";
|
|
|
|
|
Did you check my last post that i have give with your "same problem" Reply
|
|
|
|
|
Try to run this code !!!
string a="\"a\"";
string b = "\"b\"";
string c = a + b;
string d= "c="+c;
Response.Write(d);
Note : Use StringBuilder Rather Than String
|
|
|
|
|
string a="\"a\"";
string b = "\"b\"";
string c = a + b;
string d= "c="+c;
Response.Write(d);
USer String Builder Rather Than String !!!
|
|
|
|