.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Batch file to pass parameters - Masking password entry

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Windows Application

I am writing a batch file which would accept input parameters like username and password.

I would like to mask my password entry while typing it.  Is there any way to do it?


View Complete Post

More Related Resource Links

How to pass parameters to a xbap when xbap is deployed to a file system with file://

it seems that it is easy to do if xbap is deployed using http. But it seems no possible when xbap is launch with file://. 

How to pass parameters to MDX through URL?


I have an SSRS report. I created it using BIDS and it uses a Sql Server Analysis Service data source.  The data source query is an MDX query with one parameter: @region, a default value has been set for this parameter.  The value which @region takes looks like [USA].[Northeast].[New Hampshire].[Coos County].

The MDX query goes like this:

Select ....


WHERE StrToMember(@region)

This report runs properly inside BIDS or through web browser after deployment.  In my report manager at http://localhost/Reports, I am able to view this report by selecting the value for the @region parameter from a dropdownlist, which contains such values as

Coos County
Cheshire County
Sullivan County
Strafford County
... ...

I know that we can pass query parameters to SSRS through the URL. I have successfully done so with relational database which uses regular SQL. But, I have not succeeded in passing this @region parameter of my MDX query through the URL.

I tried the following:


It didn'

Need to pass parameters from URL to fields in Custom List


I have a complex customized list and I need to pass parameters of two fields so that when the 'Questionnaire' is completed and subsequentially opened after initial submission, it will retrieve the Number and GUID automatically in respective fields. I send an email out with a link to the 'Form' that carries the parameters. I am trying to use the following javaScript but am unsure as to where to place this on the SharePoint page for it to work.



<script type="text/javascript">

function loadFormVars()
getQuerystring('CustodianGUID', 'ctl00_m_g_d08916d8_7224_4665_be72_2de381f45985_ff46_1'); ///replace
customerGUID and form field name
'ctl00_m_g_d08916d8_7224_4665_be72_2de381f45985_FormField11_ctl00_ctl00_TextField'); ///replace customerGUID
and form field name

alert("it works");

function getQuerystring(key, field)
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
var qs = regex.exec(window.location.href);
document.getElementById(field).value = qs[1];


Accessing Username, password, roles in xml file


Currently I am storing my username and password (passwordFormat="SHA1") credientails in my web.config.  I would like to figure out how to access them in an xml file that I have stored in my App_Data directory rather than the web.config file because I do not want my application restarting everytime I manually add a user (small list of 5 authorized users for the CMS section).

Here is what my web.config section looks like:


<authentication mode="Forms">
      <forms name=".Administration"

How to Pass UserName & Password to codebehind page using jquery

here is login form I would like to use.
Right now it is not communicating with my codebehind page.
How do I modify the jquery  login code to post the username and password to the codebehind?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="styles/chop1.css" />
<script type="text/javascript" src="js/chopjs/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="js/chopjs/three.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/ie_png_fix.js"></script>

Retrieving lost password for a sdf file

i created database using sql server ce a few days ago but i've forgetten its user name and password. is there any solution to find my user name and password of my sql server ce database. thanqs for help.

Link to .xls but need to pass parameters

 Hi All, I have a page containing a link to to MS Excel spreadsheet (I am able to assume that Excel is available as this is an intranet page). All works fine until I want to pass a parameter into the spreadsheet. Normally I would do this with /e but this will not work I am starting Excel through a link. Any ideas how I would pass the parameters into Excel? (also - there may be multiple requests for the spreadsheet at any time with differing parameters!!)   Thanks

Form Action Button to pass parameters through URL and how to fill a NewForm with them

Hi I'm trying to solve a bigger problem we have in babysteps, and I guess after days of searching and trying I simply need to ask for help. The big picture is, that we're trying to put a Form Action Button (via Sharepoint Designer 2007) above a custom DataForm DispForm.aspx which is supposed to navigate to a NewForm.aspx where the Title Field is supposed to be prefilled with a parameter from the DispForm and the user should be able to add information to the item before it is saved. I found several explanations from people on the internet, but nothing really worked. The first babystep would be to get the parameter through the button into the url of the new item.   < input type = "button" value = "Zugriff Beantragen" name = "btnFormAction0" onclick = "javascript: {ddwrt:GenFireServerEvent('__redirect={../Zugriff Beantragen 2/NewForm2.aspx?test={ItemID}')}" />   That's the code for my button. Somebody wrote that should definitely work because SharePoint is able to replace {ItemID} with the actual ID of the item. Well.... it kind of doesn't. What I get as the end of the new URL is exactly "...?test={ItemID}"   I tried with different names for the ID, I added an @ before those ... no change. I read somewhere about javascript.functionName() which should work with all parameters of the item, but

can a Workflow access a stored procedure and pass the parameters from the list data to the stored pr

The reason that I would like to consider this functionailty is because my table architecture is complicated and I do not want to modify my master table to accept all of this data where some of the data should be normalized into sub tables.  Has anyone see evidence of the stored-procedure parm approach?  Is this best accomplished through VS 2010 or can I do it through SPD? Thanks

How to pass parameters from Application Main method to modules.

Hi , We created Prism WPF application.we have to pass some parameters(some information) to modules(they are instantiated by Bootstrapper) from Main method of App.xaml  Thanks in Advance.

How to pass the file path in EXEC of Stored Proc for getting IIS Logfile data

Hello,                  I need to get IIS Logfile data from Stored Proc. How to do this. I am using Bulk Insert Method in my stored Proc When I execute the stored proc I am getting an error that  Incorrect syntax near 'C:\WINDOWS\system32\Logfiles\W3SVC1\ex100802.log'.     Below is the code.                 Create  PROCEDURE  spWebLog @path varchar(300) AS begin exec('BULK INSERT Weblog from''' + @path + ''')  end go Declare   @SQL Varchar(100 ) Set    @SQL= 'C:\WINDOWS\system32\Logfiles\W3SVC1\ex100802.log' exec   spWebLog @SQL    

How to pass page column value to data view parameters

Hi All, I have a page library with custom column, lets call it "FormCourseId". On that page I have data view which retrieves data from custom list filtered by page column "FormCourseId". In parameter wizard creates the following tag <ParameterBinding Name="ListCourseId" Location="Form(FormCourseId)" DefaultValue=""/> Then I try to use that parameter in XSLT of data view as a filter creteria.  <xsl:param name="CourseId"></xsl:param> It does not work for me. If I change data view parameter source from Form to Query String and pass parameter as url one it works fine. What is wrong with page column parameter binding? May be if FormCourseId column is not presented in form layout as a field(I do not need to show that field in user form of the page) it could not be treated as form parameter?

Run a batch file at server side

Hello,         I am creating an intranet application which runs a batch file and create an xml file as result. Which i am using for further processing. My problem is when i am running my application from local machine batch file is running fine and creating xml,but when i am running it through iis nohting is happening,it meance process.start coudn't start command Prompt.I am using following code. I have given all permission to iis.Dim ProcessInfo As Diagnostics.ProcessStartInfoProcessInfo = New Diagnostics.ProcessStartInfo("cmd.exe", "/C " + Server.MapPath("~\myScript.bat"))        Dim Process As New Diagnostics.Process       ProcessInfo.CreateNoWindow = False        ProcessInfo.UseShellExecute = False        Process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal        Process = Diagnostics.Process.Start(Server.MapPath("~\Spandata\RunSpan.exe"))       Process.WaitForExit(20000)        Process.Close()

LDAP - directory entry issue with out user and password using impersonate and windows authentication

Hi All I am using the below code to fetch the user information from LDAP             DirectoryEntry entry = new DirectoryEntry("LDAP://DEV");             DirectorySearcher searcher =  new DirectorySearcher(entry);             SearchResult result;             searcher.Filter = "samaccountname=testuser";             result = searcher.FindOne(); here i am using windows authentication always and along with that when i enable the impersonate = true ,  the code fails at "result = searcher.FindOne();" with message "object reference not set to instance of an object "  also with the same code if i give the username and password along with the impersonate tag >> it works  or if i am using the user and password along with the DirectoryEntry  object then also it will work  but it fails with same user that i gave in impersonate tag / directory entry object with windows authentication enabled  and the  user logged to the application and no username and password tag in directory entry / impersonate tag  Interesting thing is that  in our development server ,  i am able to execute the same code with out user name p

how to pass value code behind to ashx file

Hi,i have generic handler file  ashx file , i want to pass value from my codebehind to ashx fileand i want to use switch case inside the ashx handle

Using Wizard To Pass Parameters From Page With No Buttons?

I'll start out by saying that I am kind of new to the Wizard control.  What drew me to it, was the fact I didn't need to pass variables between pages with the traditional methods.  Now I am faced with a situation where I may have to use those methods.On Step 2, I have a handful of LinkButtons that look similar to this... <asp:LinkButton ID="LinkButton113" CssClass="ListingItem" OnClick="boxChanger" runat="server" Text="Tree Services">Tree Services</asp:LinkButton> The sub boxChanger is this... Sub boxChanger(ByVal sender As Object, ByVal e As System.EventArgs) Dim s As LinkButton = CType(sender, LinkButton) Dim hd1 As HiddenField hd1 = CType(TemplatedWizardStep2.ContentTemplateContainer.FindControl("hdLinkItem"), HiddenField) hd1.Value = s.Text Wizard1.ActiveStepIndex = 2 End Sub I figured I could hide the item in a hidden field control before transfering over to the next page by changing the activestepindex.  That's not the case.  The first trip through the steps, I never retrieve the value in Step 3 from the hiddenfield.  However, if I called boxChanger to get to Step 3, use the previous button (buttons are visible on Step 3) to change index back to Step 2, then c

How to pass two parameters

This works great for 1 parameter SqlDataSource1.SelectParameters("City").DefaultValue = Me.Page.Title But I can't figure out how to pass in two parameters in a single statement (See the Select Parameters Below) Two paremeters (City, and Classification) If i set the page title to say "Bismark Charters" Bismark = City & Charters = Classification <SelectParameters> <asp:ControlParameter ControlID="CharterGridView" DefaultValue="" Name="Classification" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="CharterGridView" DefaultValue="" Name="City" PropertyName="SelectedValue" Type="String" /> </SelectParameters>The parent page title is used to populate the "City" Defaultvalue I tried using a new page element: Description="" to populate the "Classification" DefaultValue but Descriptipon is not a member of the page element eventhough it will not cause a runtime error.Anyone have any Ideas how to do this?               </SelectParameters >
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend