Retrieve MAC Id Using C#?
Feb 26, 2010I want to retrieve MAC ID of all users who are visiting to my website. How can I do this ?
Is it possible to retrieve MAC ID on Web
I want to retrieve MAC ID of all users who are visiting to my website. How can I do this ?
Is it possible to retrieve MAC ID on Web
I have used session to the creation of user and led them to the edit page ..But how do I retrieve my userID off from the session, or are there other ways to retrieve userID from?
View 3 RepliesADO.NET and have a query about reading a unique data value from a table.
PHP Code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Dorknozzle.master" AutoEventWireup="true" CodeFile="BlogEntry.aspx.cs" Inherits="BlogEntry" %>
<%@ Import Namespace = "System.Data.SqlClient" %>
[code]...
I'm building a website using ASP.NET and SQL Server, and I use
SELECT PK FROM Table WHERE PK = @@identity
My question is which is better and more reliable to retrieve the last inserted PK for multiuser website, using @@identity or using this:
SELECT MAX(PK) FROM Table WHERE PK = Session ("UserID")
I try to retrieve data from SQL database it's more than one row here is the stored procedure
create procedure "GetPhoneNewUser"
is there any way to retrieve the SSL session Id serverside in asp.net?
View 2 RepliesI have an XML file and am able to retrieve by var TV= from Tin xmldoc.Descendants("{urn:Import}T")select T;
Now if I use foreach (var eachin TV){} it iterates..but ..the actual elements are in TV.Elements (eq: TVID, TVStatus etc). It looks like it is another level deeper..I am trying to get TV..for TVID = 6 and update TVSTATUS to say 1 from previous value.
I have an page where I am embedding email-id of the user into the url and sending him mail now I want to extract the email from the url and match the value with the database. My question is how do I retrieve that email from that url?
string url = "http://localhost:3063/user/Authenticate-Users.aspx?"+emailfield;
I am writing a bit of code to store about 100 (yes/no) answers about hotels. I have about 7000 records so I need to try and get this right the first time.At the min I have 4 * int32 values stored in SQL and I use a structure containing names boolean values like swimming pool, bar etc etc. In my BLL I have a method that tests the bits in the int 32 and sets the boolean value to try or false.
I have not had any problems with this way, but was thinking about the performance as this would currently have with about 100 if statements in the BLL to set all of the boolean values.The only other ways as I see it are..
1) have 100 boolean columns in the sql table, which I feel would be messy.
2) to have all the int32 sql values populate another text field that is stored in the DB so that the int32 value creates a text string when the hotel owner populates the click boxs in the first place. - then I just display the text value which would have been created something like "pool, bar" My way of lots of ifs does work, I was just worried about the performance
I am using C#. I have a folder in the local machine, which has around 2000 images. How to fetch the Image one by one? I tried this, but I am getting only the last image.
[Code]....
I've been asked to consolidate a large intranet application. Each page consists of images. What I want to do is write a scraper that will get the image location (simple enough) but I want to be able to save the images on disk in a folder of my choice. For example, if there is an image displayed on a page, I want to take the image file and save it to disk (much like right clicking on an image and then clicking "Save As"). Can anyone give me a pointer in how to do this?
View 3 Replies[code]....
i am using asp.net and datagrid i want to show record on datagrid with 3 column but data will be unlimited i want to show record data into datagrid
my table name is user_detail and fields are User_name.Name,Passwordwell i m confussed i m using vb6 which i use recordset in replacement in asp.nety wht i use using access.
i have image path name in database and i am fetching it this way.
con.Open();
string img= "select imgPath from Tbl_Image where imgId='1'";
SqlCommand cmd = new SqlCommand(img,con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
i got path name in ds. now my question is how to assign that path to my image.
//imgCurrent.ImageUrl
I’m trying to write a webpage in ASP.net (VB.net preferably), which grabs the source of another site, parses and modifies it, then displays the modified page. Using the code from [URL], I am able to get the source of a webpage, but the particular page I’m trying to get the source of uses meta refresh, so all that I get is ‘<meta http-equiv="REFRESH" content="0;url=index.php">’. The webpage I’m trying to get the source of requires the user to be logged in, could this be the problem, and if so, how can I resolve this? I can access the page with no problems normally by entering the URL address in the browser and I’m not prompted for a password every time due to cookies, but that same page redirects me when I try to access it via my site.
View 4 Replies I am trying to get a function to work in VB ASP 2010 that would retrieve all articles in my sqldatabase. The problem is the return syntax of this function results in an error.
Code:
[code]....
when an aspx webpage retrieve data from an sql database into variables can it use the data in the variables for other users or does it has to reretrieve the data from the sql for each user ?
View 1 RepliesI am using visual studio 2008 and from toolbox i have used create user wizard. I am able to create users and when a user is created it says successfully created a user.
how can the created users "name" be retrieved. I want to use this name for updating my local database.
A user can have many addresses, but I want to retrieve the latest entry for the user
In sql I would do:
SELECT TOP 1 *
FROM UserAddress
WHERE userID = @userID
How can I create a criteria query with the same logic?
I have a DetailsView Control, inside as a template a TextBox. I need to findout the value for a TextBox when Inserting data Event handler-, _ItemInserting. The script does not work.
<asp:TemplateField HeaderText="Profile" SortExpression="ContentAuthor">
<ItemTemplate>
<asp:Label ID="uxContentAuthorDisplayer" runat="server" Text='<%# Bind("ContentAuthor") %>'></asp:Label>
</ItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="uxContentAuthorInput" runat="server" Text='<%# Bind("ContentAuthor") %>'></asp:TextBox>
</InsertItemTemplate>
</asp:TemplateField>
CODE BEHIND
protected void uxInsertAuthor_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
//// Find control on page
TextBox myAuthorProfile = (TextBox)uxInsertAuthorInput.FindControl("uxContentAuthorDisplayer");
// Set a default value in Data Base if field has been left empty (DB field NOT NULL)
if (string.IsNullOrEmpty(myAuthorProfile.Text))
{
string myAllert = "Field is NULL";
}
else
{
string myAllet = "Field is NOT NULL";
}
}
In my visual studion 2005 i just create new folder for resume uploading. i just upload some resumes in this folder... now i want to retrive the resume for paricular user..how can i ? is ther any need to create table for storing path name and retrive ...Just explain if possible provide code for retrive resume from folder in vs 2005 in asp.net
View 1 RepliesIs there a method to retrieve the file name of a class?
Specifically I would like to create a static method (CreateLink) in a base class (BasePage) to automatically return the path and filename of the page called.
I code in .C# ASP.NET
private const string TEMPLATE = "~/One.aspx";
public static HyperLink CreateLink()
{
HyperLink link = new HyperLink();
link.Text = "Click here";
link.NavigateUrl = String.Format(TEMPLATE);
return link;
}
Is it possible to avoid the use of TEMPLATE hardcoded variable? Is it possible to retrieve the One.aspx path from file name and location?
I am trying to get the value of the LinkButton that I click on. I am passing in the command argument =<%#'Xpath("ID")'%>. Since, the Linkbutton is inside the Repeater and am dynamically binding values from xml. I need the value of clicked link to send as attribute in xmlrequest again. I tried this but din't work: my aspx as linkbutton with command argument = <%#'Xpath("ID")'%> and on server side I said : string str = linkbutton1.commandargument. But i m not able to access linkbutton outside of it. Is there someway of getting the value of linkbutton?
View 4 RepliesI need to retrieve the identity value after the record has been created for another datasource. I.E. When the record is created in SqlDataSource7 the identity value (4700) would be assigned to Label1.text and used in SqlDataSource8 to insert a new record.
How do I do this? In the CodeBehind retrieve the identity value using SqlDataSource7 Scope_Identity() and putting that value into the SqlDataSource8 ApplicantID column.
[code]...
I am calling a Controller Action from a view, within that controller I need to invoke another Action which I will invoke to save the view to a network location as either HTML or Image.
How do I retrieve the URL to an Action from within a Controller. I need the actual URL, this means RedirectionToAction or View() wont work.
Why? I need to pass in a URL which will contain a call to a View. This view will be used to generate an image or HTML document using the System.Windows.Forms.WebBrowser.
.NET 3.5; C#; MVC 1;
I could do something like this, but its dirty ... well it leaves me with that dirty feeling.
using(Html.BeginForm("Action", "MyWorkflowController",
new {
MyId = "bla",
URLToGenerateImage = Url.Action("GenerateImage", "MyWorkflowController")
}))
I am using the calendar contol and picking up the date from it and iam retriving the data from back end according to it. am storing the date in format of :"2010-04-28 00:00:00.000" in back endhile passing the Calendar1.SelectedDate.ToShortDateString(); // iam getting the another format which i donot require and i need the format of yyyy-mm-dd . to retive the date from db.
View 3 Replies