|
Hi
Change your default1.aspx page to the following code.
<%@ Page Language="C#" MasterPageFile="~/MasterPage/master1.master" AutoEventWireup="true" CodeFile="default1.aspx.cs" Inherits="default1" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
Thx,
Gayani
|
|
|
|
|
Thank you. It is working now.
Balasubramanian K.
|
|
|
|
|
hello friends
I am able to connect to the xlsx file and get the Data my problem is where to keep the file i got an error which tells to keep in the
C:\WINDOWS\system32\inetsrv
i am almost dumb with this
Please suggest me what is the correct way
(* i am confused as if i upload it to my client Server suppose easycgi then where to upload this file *)
I may need to read a basic book
Still i expect reply's
Happy programming
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
You may put this file anywhere...
THe only thing you need to remember is that proper access rights have been granted to access this file...
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
hello frnds,
i got following error when am browse the site using IIS
what can i do ?
server application unavaliable
any hint ???
thankx in advnace
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
This is a very common error message...
Please post the server log as well..
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I have to get all colors of inside image and change some specific color to some else color. I am getting all colors of images but colors which are similar how to compare i mean dark balck and normal black how to compare tow rgb color
|
|
|
|
|
Member 3435614 wrote: I have to get all colors of inside image and change some specific color to some else color. I am getting all colors of images but colors which are similar how to compare i mean dark balck and normal black how to compare tow rgb color
Colors have RGB value.you can compare that value.
Color A;
Color B;
if(A.ToArgb()=B.ToArgb())
please don't forget to vote on the post that helped you.
|
|
|
|
|
That one only compare simillar color I want simillar pattern I mean I have to change color from white to black but in image not only contain pure white that is ffffff but some ffffaa,ffffbb,et. also i have to change those all similer color. plz help me.
|
|
|
|
|
Member 3435614 wrote: That one only compare simillar color I want simillar pattern I mean I have to change color from white to black but in image not only contain pure white that is ffffff but some ffffaa,ffffbb,et. also i have to change those all similer color
There are RGB value.You can also compare it
Color A;
Color B;
if(A.R==B.R && A.G==B.G && A.B==B.B && A.A==B.A)
but it is the same A.ToArgb===B.ToArgb
Can you explain in details what you want to do?
Regards
Imran
please don't forget to vote on the post that helped you.
|
|
|
|
|
I have to give option to user to chage color in image that is if one red shirt is there with some yellow and blue design then i have to give red,yellow and blue as option where user will select any one to change that color so user can select blue color and change blue color to green color like that i have to implement. help me.
|
|
|
|
|
See this example
I have made one method in which you can pass Bitmap object of image,current color of the image that you want to change as curColor and new color that you want to apply as newColor.
Now I am getting current color from image object using GetPixel Method of bitmap and apply new color using SetPixel Method.
this method returns bitmap object.after calling this method, call save method of bitmap so changes will apply.
Now this method will change image color that you want to change.
private Bitmap CreateGrayscale(System.Drawing.Image source, Color curColor,Color newColor)
{
Bitmap bmp = new Bitmap(source);
for (int y = 0; y < bmp.Height; y++)
{
for (int x = 0; x < bmp.Width; x++)
{
Color col = bmp.GetPixel(x, y);
if (col.A == curColor.A && col.R==curColor.R && col.G==curColor.G && col.B==curColor.B)
{
int r = (int)(newColor.R);
int g = (int)(newColor.G);
int b = (int)(newColor.B);
Color chgColor = Color.FromArgb(r, g, b);
bmp.SetPixel(x, y, chgColor);
}
}
}
return bmp;
}
regard
imrankhan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks Imrankhan.
But the problem is if we get all pixel of image and if we check A,R,B,G value of some perticular red portion only then also we will find that each pixel has different value of A,R,B,G for that red protion only. That is when you compare like...
if (col.A == curColor.A && col.R==curColor.R && col.G==curColor.G && col.B==curColor.B)
at that time we have to give some specific value of A,R,G,B and the portion which fit to this only will change to some other color. So if i want to change red portion whole red portion then how to change that whole red portion. Because in red portion only each pixel has diffrent value. so I need something which will replace these all realative red colors that is whole red portion not only single pixel.
|
|
|
|
|
Hi All,
I m new to asp.net
I want to make asp.net web page can be viewd by others in my shered network , by a url in browser, for this I know I have to make a virtual directory and sare it ,
but how to make a virtual directory?
Please Help
Thanks in advance
|
|
|
|
|
vjainpee wrote: I m new to asp.net
vjainpee wrote: but how to make a virtual directory?
Please take a book and read that. That's the good way to learn than posting questions. If you do a search on google, you will find many links. If you don't know how to search, this[^] would be worth reading.
|
|
|
|
|
Hi All,
I m new to asp.net
I want to make a notepad file through .net at run time ,put some text in the file and save the file at some location on the system and the file should be in open mode automaticaly (user dont need to open the file )
is it possible ?
Please give examples in c# only
Please Help
Thanks in advance
|
|
|
|
|
You can find examples in MSDN..
here is a small example for u..
Dim file As New System.IO.StreamWriter("c:\test.txt")
file.WriteLine("Here is the first line.")
file.Close()
|
|
|
|
|
vjainpee wrote: I want to make a notepad file through .net at run time ,put some text in the file and save the file at some location on the system
You can create and write to file. But you can't store the file on any location. ASP.NET has access only in the website area.
vjainpee wrote: and the file should be in open mode automaticaly (user dont need to open the file )
What do you mean ? Why should you keep the file in open mode ? You know ASP.NET is multi threaded and you will end up with synchronization issues if you keep your file open.
|
|
|
|
|
Hi All,
I m new to asp.net
I want to make a login page in which login will be roll based ,ie. if A logs in he will be redirected to some other page and if B logs in he will be redirected to some other page
Is there any simple method to do this or I have to write these conditions in code.
Please Help
Thanks in advance
|
|
|
|
|
hi
For implementing this you hav to implement Form based windows Authentication Method.Measn there will be a Login page ..For each employee there will be some roles mapped in the database.so when a user loggs in you hav to check what Role he is playing from the Data base.
Regards
Joe
|
|
|
|
|
The above answer is helpful
one more for beginer
Add a "type" field to the database means (userid,pass,type)
in login page
if(type=="a")
redirect("dd.aspx");
if(type=="b")
redirect(cc.aspx");
kkkkkkk
|
|
|
|
|
Keep user type in the database. Say you have two types of users namely, "NormalUser" and "Administrator". Create two classes say "NormalUserPage" and "AdministratorPage" which inherits from System.Web.UI.Page . Override OnInit method and do the checking. In "NormalUserPage" check current user role belongs to normal user group and redirect him if not.
Create your ASPX pages and derive that page from the appropriate classes. I mean, if you want to allow a page for admin, derive that from "AdministratorPage". This will make coding more easy than checking in each page load.
|
|
|
|
|
Why not use the built in asp.net membership classes. .Net then takes care of all this for you. You simply type something like:
If User.IsInRole("administrators") then
'do something
elseif User.IsInRole("users") then
'do something else
end if
There is a database schema which will build the membership database for you, it can usually be found at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe.
The just look up on google how to implement form based authentication.
EDIT - sorry, meant to reply to the main thread
|
|
|
|
|
Hi everybody
I create a web application in asp.net. When i brows this application from my computer then it runs.
But when i browse this application from other computer by giving my IP address then it gives message DNS error;
I Browse from my computer http://192.168.3.53/webcrm/login.aspx"
But unable to browse By giving this address
please help me.
Raghvendra Kumar Roy
|
|
|
|
|
What error are u getting???
First of all have u deployed your app in IIS as a virtual directory? If yes then check your site properties in IIS, if u have a default document, add it to the list in IIS.
When you fail to plan, you are planning to fail.
|
|
|
|