Search Results

Search found 5 results on 1 pages for 'fzshah76'.

Page 1/1 | 1 

  • Get variables in c# from ajax call

    - by fzshah76
    I've got an Ajax call for log in here is the code: //if MOUSE class is clicked $('.mouse').click(function () { //get the form to submit and return a message //how to call the function var name = $('#name').val(); var pwd2 = $('#pwd2').val(); $.ajax({ type:"POST", url: "http://localhost:51870/code/Login.aspx", data: "{ 'name':'" + $('#name').val() + "', 'pwd':'" + $('#pwd2').val() + "' }", contentType: "application/json; charset=utf-8", dataType: "json", context: document.body, success: function () { //$(this).addClass("done"); $(this).hide(); $('.mouse, .window').hide(); } }); }); the problem is I can't seem to catch name and pwd variables in Login page's preinit event or page load event here is the code in c#: protected void Page_PreInit(object sender, EventArgs e) { //taking javascript argument in preinit event //from here I'll have to build the page for specific lookbook var name = Request.QueryString["name"]; var pwd = Request.QueryString["pwd"]; } protected void Page_Load(object sender, EventArgs e) { var name = Request.QueryString["name"]; var pwd = Request.QueryString["pwd"]; SignIn(name); } I can't seem to get username name and password in c# side, help is appreciated. Here is my final javascript code c# code remains the same: <script type="text/javascript"> $(document).ready(function () { //if MOUSE class is clicked $('.mouse').click(function () { var name = $('#name').val(); var pwd = $('#pwd').val(); $.ajax({ url: "http://localhost:51870/code/Login.aspx?name="+ name +"&pwd="+pwd, context: document.body, success: function () { //$(this).addClass("done"); $(this).hide(); $('.mouse, .window').hide(); } }); }); }); </script> Thanks Zachary

    Read the article

  • How do I disable or enable 2nd dropdownlist in aspx based on selected choice of the 1st dropdownlist

    - by fzshah76
    I am having a problem with disabling DropDownList based on the chice of 1st DropDownList, there is no post back occuring, and it is a template based web app here is the current code: <script type="text/javascript"> $(function() { var dropDownList1 = $('#<%= ddlUserType.ClientID %>'); var dropDownList2 = $('#<%= ddlMember.ClientID %>'); dropDownList1.change(function(e) { if ( jQuery("#ddlUserType").val() != "ETOC") dropDownList2.removeAttr('disabled'); e.preventDefault(); else dropDownList2.removeAttr('enabled'); e.preventDefault(); } } ); </script> what is happening now is page is blank and if I remove the above code everything shows, where I am going wrong, any help would be much appreciated.

    Read the article

  • Sql inline query with parameters. Parameter is not read when the query is executed.

    - by fzshah76
    Hi All: I am having a problem with my sql query in c#, basically it's inline query with parameters, but when I run it it tells me that parameter 1 or parameter 2 is not there here is my query declared on top of the page as public: public const string InsertStmtUsersTable = "insert into Users (username, password, email, userTypeID, memberID, CM7Register) " + "Values(@username, @password, @email, @userTypeID, @memberID,@CM7Register ); select @@identity"; this is my code for assigning the parameters, I know I am having problem so I am assigning the params twice: Username =(cmd.Parameters["@username"].Value = row["username"].ToString()) as string; cmd.Parameters["@username"].Value = row["username"].ToString(); In 1 methopd it calls this query and tries to insert to table, here is the code: Result = Convert.ToInt32(SqlHelper.ExecuteScalar(con, CommandType.Text,InsertStmtUsersTable)); Exact error message is: Must declare the variable '@username'.

    Read the article

  • Dropdown selection navigation to different page with dropdown values; Asp.Net + Javascript

    - by fzshah76
    I want to access drop down menu's variable in java script on change event, here is my code <asp:DropDownList ID="DropDownList1" runat="server" onchange="document.location.href = url_Lookbook;" > <asp:ListItem Value="0">hello</asp:ListItem> <asp:ListItem Value="1">world</asp:ListItem> </asp:DropDownList> here is the script coding: <script type="text/javascript"> var url_Lookbook = "http://microsoft.com"; </script> My question is how do I pass down value=0 or value = 1 to different page, any help is appreciated.

    Read the article

  • Dropdown with image and text together in Asp.net 3.5 and jquery

    - by fzshah76
    I've been given a task to make a dynamic drop down which takes it's data[image and value id] from table. I am wondering if any of you came across this scenario or if any one can help me out in this I need help in concept and coding. Definitely any help is appreciated. I see the example in jquery here is the link: http://www.marghoobsuleman.com/jquery-image-dropdown something like this but data is coming from table.

    Read the article

1