|
None of your questions will be answered until such time you work out how to write a decent subject. You have been asked politely innumerable times.
|
|
|
|
|
yes , I agree too this person doesn't know how to post questions in forums, I think we should create a tutorial for him how to post questions in forums.
|
|
|
|
|
Don't worry Nithydurai. Spend some time time framing your question, read it twice before you post. If you think every one can understand ur question post it.
If you spend a few more minutes framing your question, you can get a more accurate answer. Thus saving UR Time and Our time.
|
|
|
|
|
Has titled EVERY post "question"
Still uses text speak
|
|
|
|
|
Hi,
I am able to get the client IP address using the following 3 ways
string test = Request.UserHostAddress.ToString();
string test2 = Request.ServerVariables["REMOTE_ADDR"].ToString();
string test3 = Context.Request.UserHostAddress.ToString();
All are returning the same values...
But which one is the Best (accuracy and performance wise) and More reliable in all respects. Which one should I use??
Regards,
~JJ
|
|
|
|
|
|
Mogaambo kush hua
|
|
|
|
|
|
They are all the same. However, they are already strings, so there is no reason to use ToString:
string test = Request.UserHostAddress;
string test2 = Request.ServerVariables["REMOTE_ADDR"];
string test3 = Context.Request.UserHostAddress;
Also:
string test4 = Context.Request.ServerVariables["REMOTE_ADDR"];
string test5 = Page.Request.UserHostAddress;
string test6 = Page.Request.ServerVariables["REMOTE_ADDR"];
string test7 = Page.Page.Request.UserHostAddress;
string test8 = Page.Page.Request.ServerVariables["REMOTE_ADDR"];
string test9 = HttpContext.Current.Request.UserHostAddress;
string test10 = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
string test11 = ((Page)(HttpContext.Current.Handler)).Request.UserHostAddress;
string test12 = ((Page)(HttpContext.Current.Handler)).Request.ServerVariables["REMOTE_ADDR"];
string test13 = ((Page)(HttpContext.Current.Handler)).Page.Request.UserHostAddress;
string test14 = ((Page)(HttpContext.Current.Handler)).Page.Request.ServerVariables["REMOTE_ADDR"];
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
when i deploy my webapplication on IIS.trying to open browse from
another machine getting HTTP:404 error
please help me
madhavi.kona
|
|
|
|
|
is your web application held locally or is it on a server?
Sounds to me like it is on a local machine
We are not a Code Charity
|
|
|
|
|
I Have created a Web Application in ASP.NET 2.0, my requirement is to get the user system information.
i.e. when the user logons to the webpage, In the home page i have to read the system information (Like OS, OSVERSION, MANUFACTURER.)..
Is it possible to do in Javascript.. If it is not possible in Javascript then is there any other way to this..??
|
|
|
|
|
Check this out:
http://www.codeproject.com/KB/system/GetHardwareInformation.aspx
We are not a Code Charity
|
|
|
|
|
the sample application i found in
"http://www.codeproject.com/KB/system/GetHardwareInformation.aspx"
is Windows application, But i need to get the information from the client machine through ASP.Net..
is it possible to execute the exe file in client machine and get the system information in asp.net 2.0
|
|
|
|
|
No I dont think you can execute a file on a user's computer using .net through your own application
try this article:
http://www.java2s.com/Code/JavaScript/Development/Getusersoperatingsysteminformation.htm
We are not a Code Charity
|
|
|
|
|
As u given the link previously wil check which OS is running in Client System..
But i need some other information Like Processor name, Model Name, etc..
Is it possible with the ActiveX components, can u guide me how to do this using ActiveX objects in ASP.Net 2.0
|
|
|
|
|
Hi
I have a CollapsiblePanelExtender1 on my page.
When the page first loads you see a flicker of what is inside it.
Is there a way to stop this/
Do I have to set my focus to another control?
We are not a Code Charity
|
|
|
|
|
sorted it, added :
Height="0px" style="overflow:hidden;"
to my panel and that stops the flicker
We are not a Code Charity
|
|
|
|
|
]]>
void validate(object source, ServerValidateEventArgs args)
{
args.IsValid = false;
}
<title>Untitled Page
<asp:button id="Button1" runat="server" text="Button">
<asp:textbox id="TextBox1" runat="server">
<asp:customvalidator id="CustomValidator1" runat="server" display="Static">
ControlToValidate="TextBox1" Text="*"
OnServerValidate="validate" ErrorMessage="CustomValidator"
SetFocusOnError="True">
|
|
|
|
|
Hi,
this is my problem: I have to create a table with unknown number of rows. There should be a button for adding a new row and a button for deleting selected rows (in each rows there is a cell with a checkbox for deleting).
How to do that? I've been trying for days, and no success...
Here is what I've done (and it's not good): in Page_Load I can see if it's a PostBack. If it is, I check which button caused it. If it is a button for adding a new row I create a row and add it to a list of rows which I save in a session. And then I call a function which takes all the rows from that list and adds it to a table. But what if I change a row in a table? I should somehow collect all the rows from the table and copy it to that session variable before PostBack, but no way to do it...
There has to be a better way to do it.
Any ideas?
Thanks.
|
|
|
|
|
|
Is it possible to do it without Ajax?
|
|
|
|
|
Try this article, its not exactly what you want but is a start
We are not a Code Charity
|
|
|
|
|
I've done something, but don't know how to finish it.
This is what I've done:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Table ID="receivingInstitutionsTable" runat="server">
</asp:Table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ButtonAddNewReceivingInstitution" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="ButtonDeleteReceivingInstitutions" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
That's my table and two buttons - one for adding new row, and second for deleting selected rows. And this is inline code:
static int numberOfReceivingInstitutions = 1;
ArrayList receivingInstitutionsArrayList = new ArrayList();
protected void Page_PreInit(object sender, EventArgs e)
{
Control controlWhichCausedPostBack = GetPostBackControl(this.Page);
if ((controlWhichCausedPostBack != null))
{
if ((controlWhichCausedPostBack.ClientID.ToString() == "ButtonAddNewReceivingInstitution"))
{
numberOfReceivingInstitutions += 1;
}
}
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
for (int i = 0; i < numberOfReceivingInstitutions; i += 1)
{
TableRow newReceivingInstitution = getNewRow();
newReceivingInstitution.ID = "receivingInstitution" + i.ToString();
receivingInstitutionsTable.Rows.Add(newReceivingInstitution);
receivingInstitutionsArrayList.Add(newReceivingInstitution);
}
}
And that adds a row without a problem. But how to delete selected? How can I see all the data in the table to check which was selected, and how to delete them after that? Please help, it's one minute job for you and hours for me.. <i></i>
|
|
|
|
|