|
Why Dont You compare the ip address of yours and the clients ..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi Sashidhar,
Thanks much for your quick reply. Let me please go in to more details of the requirement. You are right we can compare if the LAN access IP is one in the case. In our case we need to deploy the application to many client sites, there again the LAN ip would be different. We have thought about keeping a configuration in the table to identify the known ips and assuming all other requests are from internet..But intead of taking that way , would like to know any easiest or simple way in .Net to identify the request. I mean to distinguish it to LAN or internet. It would be nice to learn that information if we have any options. And If we get a confirmation that there is no direct way then can proceed in the alternate..
Thanks.
SoftwareDeveloper(.NET)
|
|
|
|
|
Siju-T wrote: In our case we need to deploy the application to many client sites,
We Can get the main Ip Address i.e.parent.So If You deploy any where, Asp.net can return the parent address so there is No problem where you deploy it.As long as it is deployed in their own productions..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Ok..Suppose if we got the ip. From that how can find out the request came through internet or intranet. Hardcoding ip is not possible unfortunately per requirement. More over the module is a generalized module and will be used in many different applications and clients. if we need to hard code and track the ip for each client it would be little difficult..But that would be the last option..The important thing is not to take another way to reach the destination. It would be nice if we get an information that whether it is possible or not. I mean is there any method can find out the request is from internet or intranet. But if you can confirm that , the way is not possible to find out then we can take the other route. But really curious to know whether it is possible or not in .Net.
Thanks.
SoftwareDeveloper(.NET)
|
|
|
|
|
My Friend First Listen..!
You have an application which is deployed in host .i.e. In Your Company with parent Ip address.xxx.xxx.xxx.xxx
The People who are working in your company will have the same parentIp address.
So what is the problem in that.
Dont think too much..!
Its an easy One You can do it..!
all the best..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Sashidar,
I am bit confused now..sorry I cannot pick your solution.
Here is my doubt.
Client machine send a request to the Server. In server how we can get the client's parent ip. Similarly it would be nice if you can share a code snippet or psuedocode etc.
Thanks.
SoftwareDeveloper(.NET)
|
|
|
|
|
You can get Many code snippets in google ..!
string ipAddress = Request.ServerVariables ["REMOTE_ADDR"];
string ipAddress2 = Request.UserHostAddress;
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I m making cart dynamically in data table and at the cart view...........i m assigning this source to a
Data List..........and Want to update the quantity dynamically............how its possible.........& wht can be other way to do this task.........plz guide me a bit........
|
|
|
|
|
I'm sorry, this question is incomprehensible. What I think you're trying to do, seems trivial, but without seeing your code, I don't see how anyone can offer specific advice.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have created my webapp in ASP.NET, C# and MS-Access.
in Table I have cell value as, 1 and 0. At the time of binding I want to convert it to On and Off respecively. How can I do it? Please help , as I am new to .NET
This is my code.
private void Binding()
{
// create the connection
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:/GmoteDeviceControl/App_Data/DeviceCtrl.mdb;User Id=admin;Password=;");
// Open the connection
con.Open();
// create the DataSet
DataSet ds = new DataSet();
// create the adapter and fill the DataSet
OleDbDataAdapter da = new OleDbDataAdapter("Select DEVICE_NAME,CURRENT_STATE from SUBSCRIBER_DEVICES", con);
da.Fill(ds);
//Binding DataSource with GridView
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
// close the connection
con.Close();
}
Thank You.
|
|
|
|
|
Purish Dwivedi wrote: Please help , as I am new to .NET
Then why are you writing data driven ASP.NET code ? That's at least three things you're trying to learn at once. Is it for school, or work ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Try Using RowDataBound event
|
|
|
|
|
|
thanks for the reply, but a new problem is,
that it is changing my column header also.
Any help would be appreciated.
Thank YOu
|
|
|
|
|
Thanks for previous reply. It worked for me.
I have ON or OFF values in a GridView cell. Based on this value I want to show a button (opposite Toggle (OFF/On) correspondingly) in another cell.
This is my code.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.Cells[2].Text== "0")
e.Row.Cells[2].Text = "OFF";
else
e.Row.Cells[2].Text = "ON";
}
please help.
Thanks...
|
|
|
|
|
You seem to have some trivial work to do, and not be able to work out how to do any of it. Why is this ? Surely no-one is paying for this code, when you have no clue what you're doing ?
Just put a button in a column. The cell itself will tell you if your button has to turn it off, or on.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
This javascript tool has made life more complicate with several
endless ParseErrorException. Is there anyone who has exported gridview to excel with girdview in UpdatePanel . More and More Error. Ajax has created more more trouble in ma life
|
|
|
|
|
AJAX is a complex thing, too many people use the toolkit and have no idea what they are doing. You don't export a gridview to Excel, you export the data source. I don't see how or why you'd use AJAX to do that, that just seems bizarre. How does it export to Excel, as a download ? That makes AJAX pointless, doesn't it ?
'
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
People opens HTML content with xls extension to make their job easier...
|
|
|
|
|
Yes the user want smart output
|
|
|
|
|
It is the Response.Write which does not work inside a button
Response.Clear();
Response.AddHeader("content-disposition", "attachment; filename=MyFile.xls");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =new HtmlTextWriter(stringWrite);
GRIDVIEW_LIST.RenderControl(htmlWrite);
Response.Output.Write(stringWrite.ToString());
Response.Flush();
Response.End();
|
|
|
|
|
Do you think this is smart output ??
It means an HTML is opened in MSExcel ...
|
|
|
|
|
|
onyang2 wrote: Do you Smoke Marijuana?Frown Frown OMG OMG Cool
Some people thinks a piece of crap a smart output...
|
|
|
|
|
Abhishek Sur wrote: Do you Smoke Marijuana?Frown Frown OMG
You Didnt Answer the Question My Frnd..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|