|
|
Hello,
I made a Calculator usercontrol and a Time custom control and added them to a DeclarativeCatalogPart.When I run the application if I try to switch to the Catalog display mode using the web part manager I get an Argument Exception:
"The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user.
Parameter name: value".
Every thing looks correct to me .Could any one help me to solve this problem?.
I am too late but i will never give up
|
|
|
|
|
Please help!!
I saw the C# code on your page for
pagebreakrender. I'd like to
redisplay the header row of my gridview on
the top of each page when I print.
How do I do this in VB?
|
|
|
|
|
I am developing a web application of which I am scanning all computers in our intranet. During the scan of each computer, I am attempting to determine if they have certain services installed or running so I will need to execute these as an administrator. I am trying to impersonate the domain administrator in the web.config and not having much luck. Here is what I put in the web.config file:
<system.web>
<identity impersonate ="true" userName ="DOMAIN\Admin" password ="password"/>
during my initialization of the web app, I am connecting to a SQL Server 2005 express database file and deleting records in case there were any left from the previous run. My code is as follows:
Dim conn As New System.Data.SqlClient.SqlConnection
Dim cmd As New System.Data.SqlClient.SqlCommand
Dim strDate As String = Now.AddHours(-3).ToString
With conn
.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("NetworkConnectionString").ConnectionString
.Open() 'Failed Line
End With
When I have the line in the web config shown above, I get an error on the failed line in code that says:
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
Based on this message, I would assume that I need to have a profile for the domain admin on the machine running the web server, which it has. Right now, the web server is on my local machine but will be eventually installed on our company's web server but I want to get this working before copying it up. All code in the web app is written in VB.NET.
If anyone has any suggestions, I would appreciate it very much. This is my first attempt at impersonation and the code I've tried to implement was from web sites specific in ASP.NET/VB.NET.
Thanks for any help!
David
|
|
|
|
|
Just for clarification, the code above:
Dim conn As New System.Data.SqlClient.SqlConnection
Dim cmd As New System.Data.SqlClient.SqlCommand
Dim strDate As String = Now.AddHours(-3).ToString
With conn
.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("NetworkConnectionString").ConnectionString
.Open() 'Failed Line
End With
works when there is NO impersonation line in the web.config file. It only fails when I have the "identity" in the web config file.
David
|
|
|
|
|
You have remembered to switch off Enable anonymous logins on the website haven't you?
|
|
|
|
|
i want to validate data first. if the data is valid then i want ConfirmButtonExtender message like ARE YOU SURE YOU WANT TO ADD?
HOW CAN I DO IT?
ANY HELP WILL BE GREATFUL
Sarfarj Ahmed
|
|
|
|
|
Hi Sarfarj
Try this.
If you are using Ajax, it will work for you.
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myScript", "alert(\"The record can not be deleted\");", true);
Write any Javascript you want in it.
I believe you need for Confirm, so use Confirm("Are you sure?") instead of Alert. Should work for you.
Cheers
Menon
|
|
|
|
|
Hi Menon
Thanks for your quick reply
what i want to do is, details is follows
1. I have a button name btnSubmit on my page
2. when you click btnSubmit then it will check Text, DropdownList etc value
3. if the values are right then it will ask me wheather i want to submit this value are not?
4. if i click ok button then it will add data into server
5. if i click no then it show me message which will tell me, data wasnt added
now could you please tell me the best solution of this
any help and example will be greatful
waiting for ur reply
thanks in advace
Sarfarj Ahmed
|
|
|
|
|
javascript function something like:
<br />
function validateAndSubmit()<br />
{<br />
var validFalg = true;<br />
if(document.getElementById(dropdownlist).selectedIndex == -1 || document.getElementById(dropdownlist).selectedIndex == 0)<br />
{<br />
validFlag = false;<br />
}<br />
if(validFlag)
{<br />
var con = confirm("Are you sure you want to...");<br />
if(con)
return true;
else
{<br />
alert('data not saved');<br />
return false;<br />
}<br />
else
{<br />
alert('please select valid values');<br />
return false;<br />
}<br />
}<br />
}<br />
<br />
call the above function on button's client click like
asp:button id="mybtn" runat="server" onCLientClick="javascript:return validateAndSubmit()"
-----
|
|
|
|
|
HI Bhatti
thank you very much for your reply
i have done my field checking after that inside btn event i put
Protected Sub ibtnAddNewBooks_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ibtnAddNewBooks.Click<br />
Dim _CheckingForm As Integer = CheckingFormForAddingBooks()<br />
<br />
If Not _CheckingForm = 0 Then<br />
ibtnAddNewBooks.Attributes.Add("OnClick", "javascript:return confirm('Are you sure you want to add this book informations?');")<br />
<br />
<br />
Else<br />
lblmessage.text= "Please Check Your Input Value" <br />
<br />
End If<br />
End Sub
but the problem is
Sarfarj Ahmed
|
|
|
|
|
Sarfraj you and I are not on same page. The code I suggested was to validate the form on the client using javascript, not on the server. From your code it seems that you are validating the form on the server side. If you want to do this way, I'll suggest the following:
Add a panel in the aspx page like this below lblmessage:
<asp:panel id="pnlYesNo" runat="Server" visible="false">
<asp:button runat="server" id="btnYes" text="Yes" />
<asp:button runat="server" id="btnNo" text="No" />
</asp:panel>
change your code as under:
If Not _CheckingForm = 0 Then
pnlYesNo.visible = true
lblmessage.text = "Are you sure you want add this book information?"
else
lblmessage.text= "Please Check Your Input Value"
pnlYesNo.visible = false
end if
Now in click event of No button, you will hide the panel like:
Protected Sub btnNo_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnNo.Click
pnlYesNo.visible = false;
lblmessage.text ="whatever you want"
End Sub
and in click event of Yes do this:
Protected Sub btnYes_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnYes.Click
// validate the form again in case user might have changed something
Dim _CheckingForm As Integer = CheckingFormForAddingBooks()
If Not _CheckingForm = 0 Then
// save the book info, display the message and clear the form
Else
// invalid values so display the message
lblmessage.text= "Please Check Your Input Value"
End If
End Sub
----- code for my previous solution
And, if you want to follow my previous code then you have to do this:
In pageload function do this:
<code>
ibtnAddNewBooks.Attributes.Add("OnClick", "javascript:return validateAndSubmit();")
</code>
now whatever you are doing in CheckingFormForAddingBooks function you will have to convert it to javascript and do it validateAndSubmit function. And on the server side in ibtnAddNewBooks_Click function you will save the books and display successful message.
-----
|
|
|
|
|
Hi all,
I am building a class where I have a sub calling my.settings like this:
Private Sub New()
oConn = New SqlConnection("Provider=" & My.settings.provider & ";" & "Datasource=" & _ My.settings.datasource & ";")
End sub
it has produced an error even though I am sure It shouldn't.
Does anyone have an idea as to how I can treat this.
Thanks
|
|
|
|
|
JMUREKEZI wrote: Does anyone have an idea as to how I can treat this.
Ignore it, because without the showing the error you are getting there is nothing that can be done.
only two letters away from being an asset
|
|
|
|
|
Hi,
It is part of a class that is used to create connection to the database.
Anyway thanks I figured out how to do it using
Dim esetting As ConfigurationSettings
Dim appSet As NameValueCollection
appSet = settings.AppSettings()
connectionString = appSet.Item("ConnectionString")
|
|
|
|
|
Hi All,
I have need to execute a SSIS package from the button click event in the Repeater. I am sending the e.CommandArgument which will use in the SSIS package.
Thanks in advance.
Sri..
|
|
|
|
|
Execute SSIS project from ASP.NET page
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I tried using the Microsoft help, I am not really a decent programmer, the website we already have, is setup to function under an access database, we hired a SQL guy to bulid us the SQL tables we needed in SQL, trying to update the Webconfig to talk to the SQL server, I have failed at.
Is what I have tried to get my website to talk to the sql
<connectionStrings>
Line 17: <add name="DIMHRSDataCon" connectionString="Server=HOODNBOTC458827;Database=DIMHRS;Trusted_Connection=Yes;"/>
Line 18: </connectionStrings>
Here is our old webconfig file talking to the access database:
<appSettings>
<add key="DIMHRSDataCon" value='Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=C:\Projects\DIMHRS\Database\DIMHRS.mdb;'/>
<add key="DIMHRSTreeviewCon" value='Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=C:\Projects\DIMHRS\Database\PA.mdb;'/>
</appSettings>
Can anyone tell me how to setup my webconfig file? So I can work on the SQL server? Using Visual Studio 2003, .NET 1.1
|
|
|
|
|
Ibuprofen wrote: Webconfig + SQL Server 2003
AFAIK, There is no SQL Server 2003.
Ibuprofen wrote: <connectionstrings>
Line 17: <add name="DIMHRSDataCon" connectionstring="Server=HOODNBOTC458827;Database=DIMHRS;Trusted_Connection=Yes;">
Line 18:
If you are using .NET 1.1, there is no connectionstrings tag so you should probably use appSetting for connectionstring of SQL
Example :
<br />
<appSettings><br />
<add key="DIMHRSDataCon" value='Server=HOODNBOTC458827;Database=DIMHRS;Trusted_Connection=Yes;'/><br />
</appSettings>
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Sorry, I meant to type SQL Server 2000 and Visual Studio 2003. Thank you, that worked for me.
|
|
|
|
|
I am generating reports using the Report Viewer. I have 9 columns.
My problem is that the report is splitting into 3 when it is generated as a PDF,
it seems that only 4 columns is displayed on a page.
Anyone know how to fix this?
macca
|
|
|
|
|
maybe, you may change the size of page.. or make the small columns that can fix within a page..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi
Mac
You can try to take a cell as a Table Instead Taking it as columns and Rows
If u r generating PDF then It is Sure it is going to Take a CEll As A TABLE
So Do it like this It may solve ur prob.
Just Do IT™ [Information Technology]™ :->
Don't Forget To Give Rating...
|
|
|
|
|
Thnaks for the reply Gandalf but how do I do this.
Do you have any examples?
macca
|
|
|
|
|
hi friend's
there are 3 div tag in my page that i use these for simulate tab menu.
in my page when a user click first button ,first div is appear and so...
this ation do with javascript.
but my problem is that: i have on third div a button that when a user click on it
my page reload from server and then my first div appear agein but the third div must be shown.
please tell me your idea for solving this problem.
thank you.
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|