|
I had to replace the Buttons with LinkButtons
|
|
|
|
|
set UseSubmitBehavior = true in Button property
|
|
|
|
|
set UseSubmitBehavior=True in Button property
|
|
|
|
|
i have one xml file and this file is displayed in gridview.and i want delete the row in gridview by using templete field.plz any one know help me.
|
|
|
|
|
Dear All,
I have created a custom attribute class in app_code as:
[System.AttributeUsage(System.AttributeTargets.Class,AllowMultiple=false)]
public class Arrtib : System.Attribute
{
public Arrtib()
{
if (HttpContext.Current.Session["UserId"] == null)
{
HttpContext.Current.Server.Transfer("~/Login.aspx");
}
}
}
And i have used this attribute as follows.
[Arrtib]
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
the basic idea behind that is "if user is not log in then request for this page (default.aspx) will redirect to login page."
this works fine in when we request default.aspx first time.
but after login and once accessing the default.aspx page and then log off. (in log of i have cleared the session.)
now if we request for the same page it should call the custom attribute constructor and redirected to login page.
BUT..... ya BUT attribute constructor is not executing.
Try to help for this problem.
Thanks in Advance.
|
|
|
|
|
hai all,
I am storing some values in an arry like following
Dim arr(10) as double
din i,j as integer
i=10
j=7
arr(1)=2
arr(2)=i*j
arr(3)=i/j
arr(4)=i+j.....
like this i am storing some expression value in arr(index).
But when i am debugging ,i couldn't see the value at runtime of perticular array data(arr(1),arr(2),arr(3),arr(4)).
I want to see the value what is going in the arr(index).How can i do this ?
I want to store in this pattern only.
Any solution please let me know.waiting for reply.
Thaks in advance.
kissy
|
|
|
|
|
hi Kissy16
but you declared your Array as an integer. You cannot declare an array and assign different datatype. rather use a string than integer.
hope this helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi Guys,
I have a doubt on Master page content page merging.
1) Which life cycle of the http request does this happens ?
2) Logically the pageload of the master page has to execute before the content page.
How ever it looks vice versa. Which is the correct way?
Thank you for your support
Sree
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Content pages load after Masterpages
Formerly know as .netman
|
|
|
|
|
hy,
i need to write a code which would display the ip address of my computer.it should also work on the server ,means... even when i m running this code on the server,i should get the ip address of the terminal that the client is using and not the ip address of the server.
It must be a client side code(may be javascript or vb script)
regards
modified on Thursday, October 16, 2008 8:20 AM
|
|
|
|
|
try this:
Request.Servervariables("REMOTE_ADDR")
Formerly know as .netman
|
|
|
|
|
Hy,
Thanks for replying to my query...but i need a client side code......I tried dde following code....IN JAVASCRIPT
var ip = '<!--#echo var="REMOTE_ADDR"-->'
// This part is for an alert box
alert("Your IP address is "+ip);
but it doestnt work....can u plz help me wd dis.....Can u tell me what a .SHTML file is actually
|
|
|
|
|
will this help u?
IPHostEntry ipHost = Dns.GetHostEntry(Dns.GetHostName());
IPAddress[] IpAddList = ipHost.AddressList;
for (int i = 0; i < IpAddList.Length; i++)
{
Response.Write(string.Format("IP Address {0}: {1} ", i, IpAddList[i].ToString()));
}
Krishnaraj Barvathaya B
|
|
|
|
|
Thankz for replying to my query..
Actually I need a client side coding....so that it can detect the ip address of the client..
|
|
|
|
|
Try this.... if ur using ASP.net
In C#
<br />
String clientIP = Request.UserHostAddress() <br />
Response.Write(clientIP)<br />
Other wise, u must have .shtml extenstion for Javascript code below to work. And u must access the page thru a server... not using file system (which makes sense)
<br />
<script><br />
var IPAddress = '<!--#echo var="REMOTE_ADDR"-->';<br />
alert(IPAddress);<br />
</script><br />
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Hy ,
Thankyou for replying to my query...I tried ur code but it didnt work..whn i tried de code behind one...i got de default ip address and whn i tried de java script one i could get de ip address of de client side....I have serched around 20 web sites ...de all have de same code dat u recommended...but dis dosent satisfy my query..
I need to display de ip address of all de clients who are viewing my web page..and de code should work on de server so dat de ip address of de person who has logged on is recorded on de server.
regards
|
|
|
|
|
Hi,
I have designed a website with different roles for users.
And according to user role they have different access permissions.
When i am going to create a new user by clicking the link exist to create a new user on the login control, it creates a user of admin role. how can i should provide different users according to role except admin role???
Please tell me the concept.
I will thankful to you....
Dipak
|
|
|
|
|
You should be able to choose which roles to apply to the user. In my app I display all the different roles in a listbox.
Check this article out:
Login Control
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
|
Has been a while since i have had any problems and with what i'm doing but today i'm stumped. I pretty much finished al lthe pages I needed and a lot of them are pages that once loaded will display an image usuall a line diagram that is created in the code file. I've been slowly sorting out the navigation and I was looking into using a master page to stay the same on all the pages with then the content changing when the user selcects an option.
I can get the master page set up and the layout I want but when i go to display one of this diagrams that I have created in another page it appears and the layout of the master page has gone. Is there anyway that I can get around this.
Any help is always appreciated.
Gretna
"When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson
|
|
|
|
|
Are these diagrams created in the class behind file for the content pages?
So basically when one of these diagrams loads you lose all the masterpage layout? or it appears wrong?
Can you provide a bit more detail about how these diaggrams are created?
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
That is indeed correct, sorry for the lack of clarity. The diagrams are all created using the Graphics and Bitmap objects respectivly in the class behind file for the content pages.
Draws all the lines using the Graphics object and then:
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
.netman wrote: So basically when one of these diagrams loads you lose all the masterpage layout?
Yeah the master page layout goes and it just shows the diagram.
Cheers
"When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson
|
|
|
|
|
I think that what you are doing here is changing the response to just show the created bitmap and clearing any other html. If you view the source of your page what do you see?
|
|
|
|
|
I thought this might be the case but can't find another way to get the image to display. The source for this is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0047)http://localhost:27041/WebSite4/Capacitors.aspx -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.3790.3041" name=GENERATOR></HEAD>
<BODY><IMG src="Capacitors_jpg_files/Capacitors.jpg"></BODY></HTML>
"When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson
|
|
|
|
|
Have you considered having your line diagram page in an iframe?
|
|
|
|