|
well the thing is across web pages i wanna do that
|
|
|
|
|
We can have classes which will hold values.
You will be able to access it across the pages.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
Hi,
In my content page, I want to apply CSS style to only one textbox not for all the textboxes in page. How to apply the stle.
my css is for to make the textbox look like label.
<style type="text/css">
{
input
{ border : 0; }
}
How to apply this?
Thanks
|
|
|
|
|
you have to give the style a name and then assign the HTML element to the style using the HTML @class attribute
<style type="text/css">
{
.MyStyle
{ border : 0; }
}
<input type="text" class="MyStyle" ....>
|
|
|
|
|
Can any one help creating a folder on a clieck of a mouse button ,where i am taking input from a text box and the folder name would be the string value taken from a textbox.
please see the code below:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
CreateFolder(Server.MapPath("."+ "test"))
Dim objFso
'# CREATE FOLDER
function CreateFolder(fdirCRE)
Set objFso = CreateObject("Scripting.FileSystemObject")
if Not objFso.FolderExists(fdirCRE) Then
objFso.CreateFolder(fdirCRE)
Else
Exit function
End if
Set objFso = nothing
End function
%>
<html>
<input type="button" ID="buttonCreateFolder" value="Create Folder" OnClick="CreateFolder()" />
</html>
lenin
|
|
|
|
|
hi,
I need some regular expression to validate the US mobile phone numbers, I've tried to find out myself but couldnt find any.
any help would be appreciated
Thanks in advance
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Do you know what the valid format for US cell phones is?
I have looked on www.regexplib.com - which is a useful repository of common reg expressions - and there doesnt seem to be one specifically for US cell phones. You might want to look there at the expressions that exist for German cell phone numbers and adjust according to the spec for US numbers.
|
|
|
|
|
no actually I dont know the format myself.
and I've also been thru regexlib.com. I thought some US native person could help me a little in this so I posted the question.
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
I might be wrong, but I think US cell phone numbers work very differently to most of the rest of the world. They are somehow attached to their fixed-line number or call plan so they dont have separate number formats like we do in the UK (ie, always starting 07).
Im possibly talking out my arse, but it strikes me as weird that regexplib.com doesnt list a format for US cell phones but lists 13 patterns for "US telephone".
|
|
|
|
|
J4amieC wrote: it strikes me as weird that regexplib.com doesnt list a format for US cell phones but lists 13 patterns for "US telephone".
That's exactly what I'm talking about. It's really weird u know
J4amieC wrote: They are somehow attached to their fixed-line number or call plan so they dont have separate number formats
That means I should put the same regular expression on Cell phone numbers as well right?
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Please tell me that can we create an array of dropdownlist in asp.net as we could do in vB by simply copying the control automatically the array will be created.
If there is some other way plz inform me
|
|
|
|
|
I wonder why you need that?
|
|
|
|
|
Actually i want to make an array of dropdownlist with same name and only difference in the index so that i can reduce the calling of my 31 dropdownlist .
In Vb we can do it by making copies of a dropdown list it will automatically make an array,but in asp.net we cant do that.
Is there any other way
|
|
|
|
|
Hi all,
iam using a javascript to lunch logoff function when a user presses X from the upper right corner of a browser. the JS function is as follows:
<br />
<script type="text/javascript" language="javascript" ><br />
function Window_OnBeforeUnload()<br />
{<br />
var iX = window.document.body.offsetWidth - window.event.clientX ;<br />
var iY = window.event.clientY ;<br />
if (iX <=30 && iY < 0 )<br />
{<br />
alert ("You will be logged Out From CID Good-Bye!");<br />
window.open('http://localhost:2018/CID/Logout.aspx');<br />
}<br />
} <br />
</script><br />
and in the body tag of the master page iam adding onbeforeunload="Window_OnBeforeUnload();" to execute the function.
My issue is that i want to close the browser after getting back from Logout.aspx. I have tried window.close() but is working some times and when it works it gives me a message that the browser is closing and dont close. I dont want this messgae to appear.
I know it is hard to capture all possible ways to close the browser but i need that because i want to free records on attempting to close i.e. i want to handle all closing ways that a browser can be closed by so i can execute a function. Is there a way to force the user to logoff other than this way?
Any ideas and thanks
|
|
|
|
|
Hi all,
I have a problem.
In my web application I have to load controls dynamically. I would like to access some properties of these controls. Assuming that the control that I have to load is called "MyControl.ascx". I have to write:
MyControl oNewControl = (MyControl)LoadControl("MyControl.ascx");
The problem is that my VS2005 don't find the MyControl name and give me a compile error.
I don't understand how to import the namespace there the MyControl definition is placed.
What I'm wronging???
can you help me?
Regards
Federico
|
|
|
|
|
Try compiling the user control code behind. Drop the DLL into the application bin and on the page, just import the namespace that your user control resides.
Then, this should work.
oNewControl = LoadControl("MyControl.ascx");
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
Federico Orlandini wrote:
MyControl oNewControl = (MyControl)LoadControl("MyControl.ascx");
MyControl.ascs should be under the same directory where the page that you wrote this code is located.
|
|
|
|
|
Hey
can any tell me how to display data in tabel Mode ( not i Gridview or Deteilasview ) from SQL .
I trying to make a book page in asp.net 2.0 c# where you can bye book but when i display them in gridview or Detailsview its look not god.
Can any one help me to show data in the cool way
Thank you very mutch
Sorry my english is not perfectly
|
|
|
|
|
Member 3499052 wrote: when i display them in gridview or Detailsview its look not god.
Member 3499052 wrote: Can any one help me to show data in the cool way
What do you mean? What is wrong with the results you are getting?
You need to be more specific about the problems you are experiencing, otherwise no one will know how to help you.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
how to convert string into System.Web.UI.DropDownList
I am having 31 dropopdownlists which is supposed to have same values from the data base. How to create an array of dropdownlists to populate all the dropdownlists in a single function.
while trying this i made the following code which shows the error that
"converting string into System.Web.UI.DropDownList not possible"
private void pop_list_shiifts()
{
for(int i=1;i<=31;i++)
{
string Dd_day_shift_i;
DropDownList strr=Dd_day_shift_i;
strr.Items.Add("-Select-");
SqlDataAdapter da = new SqlDataAdapte("sqlstring",con);
DataSet Obj_dse = new DataSet();
da.Fill(Obj_dse);
strr.DataTextField=Obj_dse.Tables[0].Columns["day"].ToString();
strr.DataSource=Obj_dse;
strr.DataBind();
}
}
|
|
|
|
|
Take a look here:
string Dd_day_shift_i;
DropDownList strr=Dd_day_shift_i;
Dd_day_shift_i is a STRING and you are tring to assign it to a DropDownList object (second row of code).
Bye
Federico
|
|
|
|
|
what u r intending to say?conversion is not possible or what?
if there any solution ,let me know..
|
|
|
|
|
In your code you have this string referece
<br />
string Dd_day_shift_i;<br />
In this line of code
<br />
DropDownList strr=Dd_day_shift_i; <br />
you are tring to assign a string reference to a DropDownList reference and it's not possible.
Which is the target of this code? Do you want to add some items in the DropDownList?
Regards
Federico
|
|
|
|
|
ok tell me can we create an array of dropdownlist as we could do in visual basic.
Actually regarding the previous question can i populate 31 dropdownlist with same values from the DB writing a single function.Other wise i will have to call the below defined function 31 times and the id of the dropdownlists are as follows(Dd_day_shift_1,Dd_day_shift_2,.......,Dd_day_shift_31)
private void pop_shift(DropDownList ddl)
{
ddl.Items.Add("-Select-");
SqlDataAdapter da = new SqlDataAdapter("select shift_name from shift_add",con);
DataSet Obj_dse = new DataSet();
da.Fill(Obj_dse);
ddl.DataTextField=Obj_dse.Tables[0].Columns["shift_name"].ToString();
ddl.DataSource=Obj_dse;
ddl.DataBind();
}
please help!
|
|
|
|
|
Can you put your dropdown lists in a repeater control? Only need to set up the binding in one place then.
|
|
|
|