|
Hi,
I am using code behind aspx.cs
c#:
if (Request.Browser.Cookies)
lblBrowser.Text = "<b>Cookie Enabled</b>";
else
lblBrowser.Text = "<b>Cookie Disabled</b>";
Problem:
-I am using IE7 and from tools>Internet Option>privacy
-I am selecting Block All Cookies
-when again I am tring to run my code it showing cookie Eanbled.
Can U solve this problem or give me some relative code.
Thanks
Ashish
|
|
|
|
|
This is the wrong forum. This is the VB.NET forum, you want the ASP.NET forum. You're not even using VB.NET for your code behind
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a small application that I am running in the system tray using the NotifyIcon control. That functionality is working well. The form is set to Minimize initially and shown when the user clicks the tray icon. The problem is where the form displays. I want it to display in the lower right corner of the screen right above the system tray. Here is the code used to display the form:
Private Sub frmMain_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - Me.Width, My.Computer.Screen.WorkingArea.Height - Me.Height)
End Sub
I have also tried:
Me.Left = SystemInformation.WorkingArea.Width - Me.Width
Me.Top = SystemInformation.WorkingArea.Height - Me.Height
I have tried both sets of code in both Activate and Form Load. Because of the "start minimized" nature of the app, initially both result in a Top and Left of -32000 because the form is not technically shown. At least that's my take.
It's only off by half the form the FIRST time the form is shown and then it jumps to where I want it to be from then on. I've tried to show the form, then quickly hide it but this seems ridiculous.
Does anyone have any suggestions?
Thanks, Joe
|
|
|
|
|
Screens.PrimaryScreen might be what you need.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am correctly reading the size of the screen (only one in play, here). The actual assignment fails on initial load due to the minimized nature of the app. Once the form is fully shown, the properties are set correctly and, after that, it displays in the correct location.
Joe
|
|
|
|
|
Joe Surls wrote: Once the form is fully shown, the properties are set correctly and, after that, it displays in the correct location.
Can't you just set the form's Visible property to False, then "show" it as you do now, and finally set the Visible property to True?
Ask not whether it is useful. Ask what it is useful for.
|
|
|
|
|
i want to know what did i need to start make a web base application in vb net, i hope someone can help me..
|
|
|
|
|
Use ASP.NET (Visual Web Developer 2008) from microsoft.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
Probably the ability to use google would help.
There's a free IDE, the Visual Studio Express Edition for Web Developers, or something. It does ASP.NET.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Is there anybody there have an idea to resolve this vb to crystalreport XI connection problem...
Im using VS2005 VB and MS ACCESS '07 and Crystal Report XI R2
Here's my code
******************
<br />
Private Sub myReportForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Try<br />
ChildFormAutoSizeFit(Me)<br />
Me.Cursor = Cursors.WaitCursor<br />
Me.MdiParent = frmMain<br />
<br />
crxApp = New CRAXDRT.Application<br />
<br />
crxReport = crxApp.OpenReport(strCRSourcePath, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)<br />
<br />
crxDataBase = crxReport.Database<br />
crxTables = crxDataBase.Tables<br />
<br />
For Each crxTable In crxTables<br />
crxTable.Location = DataSource 'My .mdb source path<br />
crxTable.SetLogOnInfo("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & crxDataBasePath, "myDatabase.mdb", "", "myPassword")<br />
Next crxTable<br />
<br />
'**** Note:<br />
'When ever i used this recordSelectionFormula? it works properly<br />
'and it get connected and show the report but then this<br />
'recordSelectionFormula is something limited for filtering data thats<br />
'why i need to use more flexible filter like CRXDRT.Report.SqlQueryString<br />
'but then my problem is the login connection from the database is somewhat failed...<br />
'****<br />
<br />
'this RecordSelectionFormula works<br />
'crxReport.RecordSelectionFormula = strSelectionfrm<br />
<br />
'this SQLQueryString failed.. why?? what's the different?<br />
crxReport.SQLQueryString = strSqlQuery<br />
<br />
AxCRViewer1.ReportSource = crxReport<br />
AxCRViewer1.ViewReport()<br />
<br />
Catch ex As Exception<br />
MsgBox(ex.ToString())<br />
Finally<br />
Me.Cursor = Cursors.Default<br />
End Try<br />
End Sub<br />
<br />
************
here's my "strSelectionfrm"
***************
<br />
strSelectionfrm = "{CmpnyDetails.IDNo} like '*' and {tblCompanyDetails.Status} = 'REGULAR' and {Attendance.AFrom} in #" & Format(DatePickerFrom.Value, "MM/dd/yyyy") & "# to #" & Format(DatePickerTo.Value, "MM/dd/yyyy") & "#"<br />
*****************
and here's my "strSqlQuery"
*************
<br />
strfilter = "Select * from CmpnyDetails as cd left outer join Attendance as att on att.IDNo = cd.IDNo where (att.AFrom Between #" & Format(DatePickerFrom.Value, "MM/dd/yyyy") & "# and #" & Format(DatePickerTo.Value, "MM/dd/yyyy") & "#) and cd.[Status] = 'REGULAR' and cd.IDNo like '*'"<br />
*****************
Please anybody can help or any idea with this?...
Please????...
a lot of appreciation in advance....
Thanks....
|
|
|
|
|
Hi guys i was wondering if anyone ran across any ID3v2 tags where the id3v2 tag, and the frame size's weren't sync byte together. I seem to be having a problem with this. thanks.
|
|
|
|
|
Hi
I'd like to use a multiline text box for my users to input a string (with new lines) so that it can be passed to a string variable as the body of an email.
As I thought simply setting the string variable to the .text property of the text box does not keep the newlines but I'm unsure how to proceed.
Any advice on how best to achieve would be gratefully received.
Thanks
|
|
|
|
|
If the user just types and types, never hitting ENTER, then there are no newlines, even if there appears to be because the textbox automatically wraps overflow text from one line to the next. This does NOT insert newline characters. The user would have to hit enter at the end of every new line where you wanted them to place line breaks.
|
|
|
|
|
Hi,
set TextBox.WordWrap false to force your users to actually hit the enter key
when reaching the right margin. You will loose the automatic wrap feature, but
now the TextBox.Text is what you want it to be.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi, I have a security program that, when opened, waits 1 min. before opening the password prompt box. When the password is entered correctly a msgbox opens up saying "Would you like to re-enable this security program?" This msg box has "Yes" or "No" MsgBoxResult option. I need help for the "Yes" part. When the user presses yes, I would like the program be what it was like right after the program was opened.
|
|
|
|
|
OK, you've got two options. Either launch a new copy of your program, closing the existing copy after the launch, or, you write your code so that there is a method that resets all of your controls and variables to their starting values. There is no single command that's going to do this for you.
|
|
|
|
|
Hi,
you could try and create a main form that remains invisible, and basically contains a loop
in which you instantiate and show a second form (your current initial form) until your
MsgBoxResult says "No".
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Does anyone know how to redirect to a specific file. when i use response.redirect("default.aspx") it looks in the current folder. How do i redirect to a file in a different folder. I have tried the file location ("c:\websites\default.aspx")but does not work.
many thanks
|
|
|
|
|
You should post this in the ASP.NET forums.
Response.Redirect requires a remote path, not a local path, e.g. Response.Redirect("http://example.com/full/path/to/default.aspx") or Response.Redirect("../../default.aspx")
|
|
|
|
|
Youc can also try
Response.Redirect("~/default.aspx")
Ask not whether it is useful. Ask what it is useful for.
|
|
|
|
|
can anyone help me out...i can show time in text box..how do i save it by insert sql statement....and hw can i insert into database
my quetion is..once enter pass and id..date and time will automatically insert to database..so end of the month i can retrive in crystal report.
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click<br />
Dim dateTimeInfo As DateTime = DateTime.Now<br />
<br />
<br />
Dim Emp_IDDataRow As DataRow<br />
Comdataset = Com.getCOMDataset<br />
Emp_IDDataRow = Comdataset.EMPLOYEE_DETAIL.FindByEmp_ID(txtID.Text)<br />
With Me<br />
If Emp_IDDataRow IsNot Nothing Then<br />
txtPass.Text = Emp_IDDataRow!Password.ToString<br />
MessageBox.Show("Login Successful!", "infor", MessageBoxButtons.OK, MessageBoxIcon.Information)<br />
Me.TextBox1.Text = .getdate()<br />
txttime.Text = Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)<br />
txttime.DataBindings.Add("text", LOGIN_OUTBindingSource, "LogIn_time")<br />
MessageBox.Show(dateTimeInfo)<br />
Form2.Show()<br />
ElseIf Emp_IDDataRow IsNot Nothing Then<br />
MessageBox.Show("Invalid Password!", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
ElseIf Emp_IDDataRow IsNot Nothing Then<br />
MessageBox.Show("Invalid ID", "ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
End If
thanks in advanced
modified on Thursday, April 10, 2008 12:20 PM
|
|
|
|
|
You can get a decent introduction to some SQL and parameterized queries here[^]. It's not a step-by-step "this is how you do it", but it does demonstrate how to run queries.
As for teaching you how to do this, it would take a small book to lay all this stuff out. That's far bigger than any series of forum posts would allow for...
|
|
|
|
|
I don't think this would even compile ? I think he's trying to call getdate in VB, when I told him yesterday it's a function inside SQL Server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yeah, it's not looking good at all. I'd scrap all the adapter stuff and just go with the hand written data layer since it'd be so small. But, as you've said, you kind of have to know what your doing in either case. Just because it's "drag'n'drop" doesn't mean you can use the stuff without knowing how it works.
|
|
|
|
|
code :
Imports Microsoft.WindowsMobile.Telephony
Dim phone As New Phone
phone.Talk("+1.....", True)
=============================================
That code to dial number using Visual Basic for Pocker PC devices
Haw can I disconnect that dialing from My application And Haw to monitoring the connection to Know it's status whether
Dialing , connected or No connection
|
|
|
|