|
Actually its a cascading DDL when selecting the Dept name in the 1st DDL the second DDL displays the corresponding Emp name , upto this i have done it,
Now i want emp no based on the second DDL in a alert box upon clicking a button.
should i pass a sql command to a javascript function, if so i donno the syntax, I am new to javascript
|
|
|
|
|
Hi
Try to bind the EmpNo to the ddl If u did it like below
DDl.DataTextField = "Emp_Name";
DDl.DataValueField = "Emp_No";
now get the DataValueField From JavaScript
If It Helps Click It as Answer
|
|
|
|
|
in page load method put following code
ddlEmp.Attributes.Add("onchange","showAlert(this)");
then add following javascript on your page
function showAlert(ele)
{
alert(ele.value);
}
|
|
|
|
|
Hi,
I am facing a problem with ultrawebgrid that I used in my asp.net page. For one of the columns, say "Status" in the grid, there is an editor control - webcombo. Whenever the user clicks this column, I dynamically populate the webcomobo using an AJAX call (using XMLHttpRequest) in the "BeforeEnterEditModeHandler" client side event. The first click seems to be working fine. The subsequent clicks are not even invoking my Ajax page. I am not even hitting that break pointer in the Ajax page method. Instead once I make the send call of the XMLHttpRequest, while debugging, it takes me directly to igtbl_fireEvent - to this line:
if (gs.GridIsLoaded && result != true && eventObj[1] >= 1 && !gs.CancelPostBack)
igtbl_needPostBack(gn);
gs.CancelPostBack = false;
Finally, it sets the CancelPostBack to false....probably, this may be causing the problem because, the grid is trying to postback. I've this grid in an asp.net UpdatePanel. Can anybody help me with this? Am I doing wrong somewhere?
Any idea is highly appreciated. I am in a crucial stage of my project and I am unable to figure out what's happening.
Thanks,
Kala
|
|
|
|
|
I'm displaying a datagrid with a couple of decimal numbers. I would like to always display the first two digits after the decimal point and only display additional digits if they are present.
I've tried {0:N2} and {0:D2} results are the same - only two digits.
I've tried {0:N3} and {0:D3} results are the same - always three digits.
Any ideas? Thanks in advance!
What ever happened to just using a mask #,##0.00###?
|
|
|
|
|
Hi All,
I have a ModalPopextender control on my page.
When I enter some value on the textbox i am calling one Javascript function to validate the value in the textbox with onBlur event. if the validation error rises i am showing that error on AjaxModalPopcontrol . and when i Press "ok" on that Control, i Should retain the Focus on The textBox agian.
How to Achieve this?
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
yadlaprasad wrote: How to Achieve this?
Sometimes you have to step away from drop & drag and actually do something yourself. Write the script for the button click event
only two letters away from being an asset
|
|
|
|
|
try putting some javascript to change foucs on OnClientClick event of OK button
|
|
|
|
|
Something must be wrong, as this is probably the most basic validation example ever - yet I still can't get it to work properly, and I actually suspect an error somewhere.
Create an aspx page with a textbox, a requiredfieldvalidator and a button. Set the validator to validate the textbox and set its text property to "*". Run the project. Now, I would assume that clicking the textbox and then tabbing to the button would show me the text-message from the validator (the red *), indicating that I haven't entered data where I need. Guess what - it doesn't show up...
However, clicking the field, entering data, tabbing away and then back, deleting the data again and then tabbing away again DOES show the red *. Because the validation of the textbox is handled from the onchange event. Try running this in the url field:
javascript:void(alert(document.all.TextBox1.onchange))
- it will give you
Message from webpage
---------------------------
function anonymous() {
ValidatorOnChange(event);
}
, whereas the
javascript:void(alert(document.all.TextBox1.onchange))
will return null.
Manually hooking the onblur event to the onchange event as so:
javascript:void(document.all.TextBox1.onblur=document.all.TextBox1.onchange)
will introduce somehow correct behaviour.
Now - is it me who has failed to understand the simples of all validation scenarios - or is the requiredfieldvalidator broken. I hope it is the first option, but what the h... am I missing?
Sample code:
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ErrorMessage="RequiredFieldValidator"
ControlToValidate="TextBox1"
Text="*"></asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="Button"/>
</div>
</form>
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
RequiredFieldValidator is a server control and is not evaluated until a postback occurs. The onblur event is handled on the client.
only two letters away from being an asset
|
|
|
|
|
Greetings. I am developing an e-attendance application in asp.net and c# code behind. I want that staffs will take their attendance through fingerprint scanner when entering into their offices. Only managers and HR staffs will access the e-attendance for reporting purposes. Please advise me on how to proceed.
|
|
|
|
|
MPORANYI J. Cheriaux wrote: Please advise me on how to proceed.
Outsource it.
What have you done so far?
You need to come up with a design, and later if you find any problem than you can come up and discuss here.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yes... There are few fingerprint scanners there (even I have one which I use when login to the windows) which gives us the support to get the actual fingerprint id from that or otherwise you need to train first about your fingerprint and it will check with it each time.
But in all the situation the user needs to install driver to the client himself and also attach the small fingerprint device to it. In case of web, everything that you get is the web interface. So if you implement your website using fingerprint scanner, each client should have the fingerprint detection software installed, and also you need to somehow interface their data to your web browser. I guess you might need browser plugin also to implement this.
Everything depends on the device you are using.
|
|
|
|
|
Hi,
i use the ASP.NET 3.5 included security system.
i want to change the min password length and i will not work with Non-alphanumeric characters...
but how???
|
|
|
|
|
Use the Followin Code In Web.Config file It May Help
I used in the following way
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
connectionStringName="MyAspNetDB"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/SamplesRolesApp"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="100"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
If It Helps Click It as Answer
|
|
|
|
|
Thanks for you answer!!!
i thing i am to dumb
i have insert the configuration in my web.config... but
Parser Error Message: Unrecognized configuration section providers.
on which position have you insert the providers tag??
Cheerio!
|
|
|
|
|
hi,
this is kesava
i created a windows usercontrol and make it as strong name and also registered using regasm after make site is trusted and i used in web application it works fine .
But the problem is if i want to run this application on the other system it wont display the usercontrol .
If anybody know the solution please send a mail to me(ramki.pindi@gmail.com)
|
|
|
|
|
What ??
You are telling me that you have placed a windows usercontrol in a web form??
I think what you did, is you called the process exe of that windows application which is installed in the server. In case of client, as they doesnt have that installed, it wont run.
I think you need to clear up your basics on how web env runs before you actually proceed writing code. In web browser can only run html code. It cant understand anything other than this. If you want your client to run your application, you need to make them download the file and then install it to them and run that themselves.
|
|
|
|
|
I created the windows application as usercontrol and place the dll in the root folder of the web application .After that using <object> tag i placed the usercontrol on the web page it works on my system but when i try to run this application it will show only the rectangle border on the other system.
|
|
|
|
|
This will require every client using page with user control must have .NET installed.
|
|
|
|
|
in that system also having the .net
|
|
|
|
|
Hi all,
I have a set of help files(html files) in the application root directory. Now these HTML files can be accessed by the users even if they are not logged into the application. How can I restrict this?
Similarly, how can I restrict users to download java script files which is in my application root directory by directly typing the URL in the browser.
Please note, the authentication mode is windows and framework used is 1.1.
Kindly help...
Thanks in advance..
Rijz
|
|
|
|
|
Well.. .Actually browser makes separate http request for each individual external files.
Rijz wrote: Now these HTML files can be accessed by the users even if they are not logged into the application. How can I restrict this?
To make access to the html files.. I would suggest to use separate HttpHandler which will authenticate your request againist some session id, if session is created already or will do it using uid and password.
Rijz wrote: Similarly, how can I restrict users to download java script files which is in my application root directory by directly typing the URL in the browser.
In case of Javascript as a separate request is made from the browser, it would not be a good idea to restrict the download of the file. Some browser requests javascript after document is fully loaded, but there are others which actually starts download of the file as soon as it parses the Javascript tag. So you cant trap the behaviour of the browser.
Rather, I would suggest you to edit your javascript and place your sessionid within the url. Place your sessionid in a sesssion variable or in database. Create a separate HttpHandler for Js file which will check if the sessionid(might be your custom GUID which you generate during the login) passed with the querystring is valid for the current user. Allow download of the javascript only when url is valid.
say in your browser you place script tag like this
<script type="text/javascript" src="yourjavascript.js?sessionId=<%=this.Session.SessionId%>
Now from ProcessRequest of IHttpHandler , check
string qry = context.Request.QueryString["sessionId"] as string;
if(!context.Session.SessionId.equals(qry))
{
context.Response.clear();
context.Response.close();
}
Also remember to implement your class from RequiresSessionState , otherwise session will not be available in the
HttpHandler .
Hope you got the idea.
|
|
|
|
|
Hi all
can any one Help On this
i am using the gridview item template ,Edit itemTemplate,footer Template
to insert the data into the DB
i have developed a webservice which displays Cityname as the user types in the the character
here is the code..
<asp:GridView
ID="dg_masters" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3"
GridLines="Horizontal" ShowFooter="True" Width="746px"><AlternatingRowStyle
BackColor="#C2D69B" />
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:TemplateField>
<ItemTemplate>
</ItemTemplate>
<FooterTemplate>
<asp:Button ID="btnAdd" runat="server" CssClass="Button" Text="Add" OnClick="AddNewDesignation"
ValidationGroup="abc" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Designation Code">
<EditItemTemplate>
<asp:TextBox ID="txt_DesignationCode" runat="server" CssClass="textboxDisabled"
Text='<%# Eval("Designation Code")%>' Enabled="false">
</asp:TextBox>
<asp:RequiredFieldValidator ID="txt_Vld_designCOde" runat="server"
ControlToValidate="txt_DesignationCode" Display="Dynamic"
ErrorMessage="Designation Code" CssClass="Validators">
</asp:RequiredFieldValidator>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txt_designationCode" runat="server" CssClass="textboxDisabled" MaxLength="3">
</asp:TextBox>
<asp:RequiredFieldValidator ID="txt_Vld_designCode1" runat="server"
ControlToValidate="txt_designationCode" Display="Dynamic"
ErrorMessage="Designation Code" ValidationGroup="abc" CssClass="Validators">
</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="lbl_DesignationCode" runat="server" Text='<%# Eval("Designation Code")%>'>
</asp:Label>
</ItemTemplate>
<ItemStyle Width="30px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Designation Description">
<EditItemTemplate>
<asp:TextBox ID="txt_designDesc" runat="server" CssClass="textboxEnabled"
Text='<%# Eval("Designation Description")%>'>
</asp:TextBox>
<asp:RequiredFieldValidator ID="txt_vld_DesignDescr" runat="server"
ControlToValidate="txt_designdesc" Display="Dynamic"
ErrorMessage="Designation Description" CssClass="Validators">
</asp:RequiredFieldValidator>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txt_designDesc" runat="server" CssClass="textboxEnabled" AutoCompleteType="None" >
</asp:TextBox>
<cc1:AutoCompleteExtender ID="aceMinfileNumber" runat="server"
ServicePath="WebService.asmx" ServiceMethod="GetCompletionList" TargetControlID="txt_designDesc"
MinimumPrefixLength="1" EnableCaching="true" CompletionInterval="1000" CompletionSetCount="15" />
<asp:RequiredFieldValidator ID="txt_vld_designdescr" runat="server"
ControlToValidate="txt_designdesc" Display="Dynamic"
ErrorMessage="Designation Description" validationGroup="abc" CssClass="Validators">
</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="lbl_designDesc" runat="server" Text='<%# Eval("Designation Description")%>'>
</asp:Label>
</ItemTemplate>
<ItemStyle Width="100px" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
</asp:GridView>
WEBSERVICE
Dim adp As SqlDataAdapter
Dim str_Qry As String
str_Qry = "select distinct cityname from tblLocation where cityname like '" + prefixText + "%'"
adp = New SqlDataAdapter(str_Qry, cnn)
Dim daset As Data.DataSet = New Data.DataSet
adp.Fill(daset, "xxx")
Dim temp As New List(Of String)
For i As Integer = 0 To daset.Tables(0).Rows.Count - 1
temp.Add(daset.Tables(0).Rows(i).Item(0).ToString())
Next
Return temp.ToArray
cnn.Close()
plzzzzzzzzzzzzz Its urgent
|
|
|
|
|
devkranth wrote: plzzzzzzzzzzzzz Its urgent
vats your question?
|
|
|
|