|
hello all
i have your code for resizing the webform but its not runable
the code is
function openWindow()
> {
> hgt = 600;
> wdth= 760;
> tp= (screen.height/2)-(theHeight/2);
> lt= (screen.width/2)-(theWidth/2);
> ftr=
> 'height='+theHeight+',width='+theWidth+',top='+the Top+',left='+theLeft+",scr
> ollbars=yes";
> open ('page.aspx?','',features);
> }
this is javascript function .
and i called it in codebehind. that code is
ControlName.Attributes.Add("OnClick","openWindow();");
pls help me
Gayatri
Gayatri
|
|
|
|
|
Change,
wrote: ControlName.Attributes.Add("OnClick","openWindow();");
ControlName.Attributes.Add("OnClick","openWindow(); return false;");
The page will postback when you click the button. May be that would be the problem. return false will stop the Page postback.
|
|
|
|
|
i am adding the controls at runtime. Say textboxes and buttons then how can i get the click event of these buttons.Very urgent
Mohinder Singh
|
|
|
|
|
Here you go...
AddHandler ControlName.EventName, AddressOf Event 'Where you write the statements
|
|
|
|
|
what is the address of the event. i want to write "Response.Redirect("Message.aspx? Qoestion=" & TxtTopic.Text, False)" this statement in button click event.
Mohinder Singh
|
|
|
|
|
Try this,
Assigning the Click Event to Button,
AddHandler Button1.Click, AddressOf Button1_Click
Button Click Event,
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect("Message.aspx? Qoestion=" & TxtTopic.Text, False)
End Sub
This would help, I believe....
|
|
|
|
|
Hi i have intime(08:45) and outtime(20:16)=>24 hours format...,
Dim intime As DateTime
dim outtime as datetime
Dim tspan As TimeSpan = outtime.Subtract(intime)
use this i can get total work hours for a day shift..........,
suppose if its night shift.........,
intime(19:45) and outtime(08:00)=>24 hours format...,
then how i can get total work hours......,
plz help me..................
Magi
|
|
|
|
|
Take the Date also with the time.
|
|
|
|
|
Hi i am new in this concept...,
So pls tell me clearly........,
if sample codes will be there send it to me.....,
Regards,
Magi
|
|
|
|
|
Get the Date as input with the time and then find the difference.
Say,
Dim TimeIn, TimeOut As String
Dim Hours As Double
TimeIn = "03/19/2007 19:20:12"
TimeOut = "03/19/2007 19:41:12"
Hours = DateDiff(DateInterval.Minute, CDate(TimeIn), CDate(TimeOut))/60
I hope this will help you...
|
|
|
|
|
Hi i am if i have the second date then i will use query.....,
But i dont have second date...........,
Just my input is intime and outtime only...........
with that i want to calculate for night shift work hours..........
see my ques is i have intime(19:45) and outtime(8:53)
so if i use time span then i am getting value (10:59)
but exact answer is (13:08)
i need difference between two times.............
Magi
|
|
|
|
|
We have developed a website recently.Now i want to develop it with multilangual support.I want to know step by step procedure to do this.Iam very new to unicodes.Can anyone try to answer this as soon as possible.
|
|
|
|
|
How can keep session active for a long time ?
|
|
|
|
|
may be i did'nt understand your problem.......but what is the problem in setting the "session timeout" variable in the web.config file?..you can set it as per your requirement.....
Live life to the fullest
|
|
|
|
|
DooDooo wrote: How can keep session active for a long time ?
Here[ ^] is the sample to prevent session time out.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi
i need to read an xl file into table .
how can i ? plz send with code
Suresh.R
|
|
|
|
|
try the code below...this is just a snippet....you have to properly declare the variables or path of the file and you have to check for proper file name and extension also where needed....
Dim conStr As String = "provider=Microsoft.Jet.OLEDB.4.0;data source=" + filepath + "; Extended Properties=Excel 8.0;"<br />
''"filepath" is the path of the .xls file <br />
Dim sql As String = "select * from [Sheet1$]" ''"Sheet1" is the name of the excel sheet<br />
MyConnection = New System.Data.OleDb.OleDbConnection(conStr)<br />
MyConnection.Open()<br />
MyAdapter = New System.Data.OleDb.OleDbDataAdapter(sql, MyConnection)<br />
dim myDs As DataSet = New System.Data.DataSet<br />
MyAdapter.Fill(myDs)
let me know if you face any problem
Tirthadip
Live life to the fullest
|
|
|
|
|
Here is a C# code
//-------------------------------------------
private DataSet PerformQueryIntoDataSet(string strFileName,string sheetName)
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + strFileName + ";" + "Extended Properties=" + Convert.ToChar(34).ToString() + "Excel 8.0;HDR=YES; IMEX=1;" + Convert.ToChar(34).ToString();
//You must use the $ after the object you reference in the spreadsheet
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM ["+ sheetName + "$]", strConn);
DataSet myData = new DataSet();
myCommand.Fill(myData, sheetName);
return myData;
}
//-------------------------------------------
|
|
|
|
|
u can do this.
Dim ds As New DataSet
ds.ReadXml("test.xml")
now this dataset can be bind to any control.
Thanks,
Sun Rays
|
|
|
|
|
Hi
We are developing an ASp.net application where we can upload video files . When user upload a video we need to convert file to FLV. Conversion should be automated and the result needs to displayed to user.
How to do this?
|
|
|
|
|
Hi tiger have you found solution? we also need same feature
Pramit
Lets develop
|
|
|
|
|
I want to make a radio on my site. My site is writen in asp.net and ajax. On the main page I've got a tag <embed src="MusicFile.mp3" /> witch plays me a single music file. I want to create a page in witch music will be played, and when the music file ends - another file will be loaded and played. How do I do that? Is the the embed tag good for that or do I need a different tag?
|
|
|
|
|
Hi, I need you execute a windows service from webform, work in visual studio .net 2003 vb.net. I try with servicecontroller component but not work
Try
Dim servicio As New ServiceProcess.ServiceController
servicio.MachineName = "SINNIUNO"
servicio.ServiceName = "DEMONIO"
Me.Button4.Text = GetServiceStatus(servicio)
If servicio.CanStop Then
servicio.Stop()
Else
End If
Catch ex As ServiceProcess.TimeoutException
End Try
appear this error message
Detalles de la excepción: System.ComponentModel.Win32Exception: Acceso denegado
[Win32Exception (0x80004005): Acceso denegado]
[InvalidOperationException: No se puede abrir el servicio DEMONIO en el equipo 'SINNIUNO'.]
System.ServiceProcess.ServiceController.GetServiceHandle(Int32 desiredAccess)
System.ServiceProcess.ServiceController.Stop()
MataServicios.WebForm1.Button4_Click(Object sender, EventArgs e)
Any idea
Thank's
|
|
|
|
|
Hi,
I'm using Windows Authetication For my datagrid. And I got this example But it's not giving me the name. Where I'm I getting it wrong?
<authentication mode="Windows">
...
<authorization>
<deny users="?">
Thanks
|
|
|
|
|
There was no pasted snippet.
|
|
|
|