|
Hi all,
I have a problem right now. I want to make a dll with one or two functions. Than i want to deploy that dll on my applications client machines for security purpose. when a machine having that dll will try to browse my applicaation, first i will call a method from the dll that is present on the machine. if i got the response than i will allow that machine to check my application.
I have already browsed Richard Birkby article, but he didn't explain about invoke.dll and how to run the application.
See if someone can help me.
Thanks
Faisal
|
|
|
|
|
You can write a .NET, ActiveX or Java control which runs on the client. You can't just deploy a dll to your client machine and run it from your web app.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I think for that activex i don't need to install framework or any other installation on client machine??
|
|
|
|
|
You should install that activex control. It works on client side.
|
|
|
|
|
Hi all,
iam not able to figure out what i have to do for displaying related record details inside formveiew on linkbutton click . i have added seperate linkbutton for each reservation and wants to display record details inside formview but problem is that only single record is displaying on all linkbutton clck
i have seven records in table .
here is my code
sqlcmd.CommandText = "Select Reserve_ID from Reservedvehicle"
sqlcmd.Connection = sqlconn
Dim sqlrdr As SqlDataReader = sqlcmd.ExecuteReader
While sqlrdr.Read()
Dim tblcell As TableCell = New TableCell()
Dim tblrow As TableRow = New TableRow()
Dim lnk As New LinkButton
lnk.Text = "click here for details "
lnk.CommandArgument = (sqlrdr("Reserve_ID"))
'add Click functionaliuty
AddHandler lnk.Command, AddressOf OnClickLink
tblcell.Controls.Add(lnk)
tblrow.Cells.Add(tblcell)
Table1.Rows.Add(tblrow)
End While
sqlrdr.Close()
Here is event handler :
Protected Sub OnClickLink(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
Dim lnkbutton As linkbutton = sender
Dim param As String = e.CommandArgument
FormView1.Visible = True
Dim myConnection As New SqlConnection("Server=localhost;Database=Reservation;uid=sa;pwd=server")
Dim ad As New SqlDataAdapter("SELECT * FROM reservedvehicle ", myConnection)
Dim ds As New DataSet()
ad.Fill(ds)
FormView1.DataSource = ds
FormView1.DataBind()
End Sub
can any body guide me what i have to do to reslove this issue .
Best Regards
Rameez
|
|
|
|
|
Hi,
How can we databind an HTML Input type Text control? I'm using a DHTML calendar in my formview's EditTemplate and this calendar needs a HTML text control, not an ASP.NET TextBox server control. But I cannot bind my Input text which get a date from user because it doesn't accept the Bind() method.
Any idea what I'm doing wrong here?
Regards,
Blumen
|
|
|
|
|
Can any one tell me the jscript code function in asp.net for validating text box like....
1)removing first space
2)adjusting middle space by single one
3)not copy text from textbox
4)e-mail validation
which used in inline code.
<asp:TextBox ID="TextBox1" onkeypress="myfunction();" runat="server"></asp:TextBox>
Thanks in Advance
Amol
<div class="ForumMod">modified on Tuesday, September 16, 2008 2:24 AM</div>
|
|
|
|
|
<!-- first: set causesValidation attributon to your controls to true
second: for each control add a requiredFieldValidator
third: set the validationGroup attribute for the button to Group1
-->
<asp:TextBox ID="txtBox1" runat="server" CausesValidation="true" OnTextChanged="txtPrefix_TextChanged" ></asp:TextBox>
<asp:TextBox ID="txtBox2" runat="server" CausesValidation="true" OnTextChanged="txtPrefix_TextChanged" ></asp:TextBox>
<asp:RequiredFieldValidator ID="reqPrefix" runat="server" ErrorMessage="Enter Prefix" ControlToValidate="txtBox1" ValidationGroup="GROUP1" > </asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="reqPrefix" runat="server" ErrorMessage="Enter Prefix" ControlToValidate="txtBox2" ValidationGroup="GROUP1" > </asp:RequiredFieldValidator>
<asp:Button ID="btnValidatePart" runat="server" Text="Validate" ValidationGroup="GROUP1" EnableViewState="true" OnClick="btnValidatePart_Onclick" />
xxx
|
|
|
|
|
i am a beginner in asp.net so can u give me solution for jscript file i.e. call jscript function in .aspx file without press any buttoni.e.submit or ok button
only call it like keypress event or like for in text box no key active for any keypress event
<asp:textbox id="TextBox1" runat="server" onkeypress="return NoKeyPress(this);" xmlns:asp="#unknown">
thanks in advanced
amol
|
|
|
|
|
I could not find a pictureBox icon in the toolBox. Therefore,
how do I create a picturebox control at run time.
Thank You, Signed Linda
xxx
|
|
|
|
|
User Image/ImageMap control. PictureBox is for Windows Application.
|
|
|
|
|
good day
i have 2 sites hosted on the SAME server . the two sites are asp.net 2.0 apps. the first site delivers aspx files on requested, but the second site gives the error "Server Error in / Application" when aspx is requested.
pls help solve this problem.
it is urgent.
|
|
|
|
|
Check the event viewer to find error occured.
Omage femi wrote: it is urgent.
Is it? Read this[^]
|
|
|
|
|
thanks navaneeth,
the 2 sites are public domains hosted on the internet
i dont have access to the event viewer. and the asp.net 2.0 app was written in vb.
|
|
|
|
|
Omage femi wrote: the 2 sites are public domains hosted on the internet
You can contact your hosting provider and get the details.
|
|
|
|
|
I want to have current querystring values in HyperLinkField of a Gridview. For example i have a list of employees page with department id already in the querystring, now i want to have View Details link to take user to employee details page with employee_id added to querystring but also keep department_id in the querystring. Like following code
<asp:HyperLinkField DataNavigateUrlFields="employee_id, <%= Request.Querystring["department_id"] %>"
DataNavigateUrlFormatString="employee_details.aspx?employee_id={0}&department_id{1}" HeaderText="Action" Text="View Details" />
The current code gives me following error message.
Parser Error Message: Literal content ('<asp:HyperLinkField DataNavigateUrlFields="candidate_id,') is not allowed within a 'System.Web.UI.WebControls.DataControlFieldCollection'.
I hope there is some other way i can achieve this functionality while keeping it declarative as possible without using code behind.
Thanks
Humayun Shabbir Bhutta
http://www.sourcesystems.net
http://sourcesystems.net/humayun
|
|
|
|
|
hi,try this
<asp:hyperlink id="hlUsage" runat="server" navigateurl="<%# " ~="" admin="" agentusage?id=" & Request.QueryString(" id")="" %>view="" <="" asp:hyperlink>="" xml>"="" xmlns:asp="#unknown">
|
|
|
|
|
Hi, i was also able to resolve this problem by converting the field to template using following code. And without going to codebehind
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# Eval("employee_id", "employee_details.aspx?cid={0}&department_id=" + Request.QueryString["department_id"]) %>'
Text="View Details"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
Humayun Shabbir Bhutta
http://www.sourcesystems.net
http://sourcesystems.net/humayun
|
|
|
|
|
It work out best for me by set the gridView at runtime...
protected void Page_Load(object sender, EventArgs e)
{
grid1.Visible = true;
setGridValues();
}
private void setGridValues()
{
grid1.Visible = true;
grid1.AutoGenerateColumns = true;
DataTable dt = new DataTable(); // dataTable
// column names ...
dt.Columns.Add("ID");
dt.Columns.Add("DateRequested");
dt.Columns.Add("ServicePartNo");
dt.Columns.Add("qty.");
dt.Columns.Add("VIN");
dt.Columns.Add("RoNo");
dt.Columns.Add("GCQIS");
dt.Columns.Add("Status");
// add hyper link to add to grid1........................
HyperLinkField linkX = new HyperLinkField();
string[] fldS = { "ID","Status" };
linkX.HeaderText = "ReqID";
linkX.DataTextField = "ID";
linkX.DataNavigateUrlFields = fldS;
linkX.DataNavigateUrlFormatString = "summaryReqNo.aspx?reqNo={0}&status={1}";
linkX.Target = "_self"; // = "_blank"
grid1.Attributes.Add("BackColor", "#CCCCCC"); // add attributes to grid
grid1.Attributes.Add( "BorderColor", "#000099");
grid1.Attributes.Add("BorderWidth", "3px");
grid1.Attributes.Add("ForeColor","#333399");
grid1.Attributes.Add("Width", "7in");
grid1.Columns.Add(linkX); // adding hyper link devined above to grid
cRequests reqS = new cRequests(userX); // values from classto loade into grid
// adding rows to grid1 ......................................
foreach (cRequest item in reqS)
{
object[] aryX = new object[8];
aryX[0] = (item.reqID);
aryX[1] = (item.reqDate).Value.ToShortDateString();
aryX[2] = (svcPN.prefix) + "-" + (svcPN.basePart) + "-" + (svcPN.suffix);
aryX[3] = (svcPN.svcQty);
aryX[4] = (item.reqVIN);
aryX[5] = (item.reqOrdNo);
aryX[6] = (item.reqGCQISNo);
aryX[7] = item.status;
dt.Rows.Add(aryX);
}
grid1.DataSource = dt;
grid1.DataBind(); // gridX.DataSource = arryLstX;
}
I hopes this helps. Thanks, Signed Lindall
xxx
|
|
|
|
|
Hi,
I have 5 text boxes on my form and I need to add another text box when I click add new button on the form similar to adding a new experience or educational detail in jobsites. Can anyone suggest best way to do it.
thanks
Uday
|
|
|
|
|
Use GridView/DataGrid where textboxes are placed in a template column. For adding new rows, add new rows to the datasource and rebind grid. This is the easiest method and you won't get any viewstate issues.
|
|
|
|
|
Create an instance of TextBox and add it to Page's controls collection do it in your button's event
|
|
|
|
|
But you will end up with viewstate issues.
|
|
|
|
|
yeah he has to handle viewstate explicitly
|
|
|
|
|
txtBx1 = New TextBox()
txtBx1.ID = "TextBox1"
txtBx1.Style("Position") = "Absolute"
txtBx1.Style("Top") = "755px"
txtBx1.Style("Left") = "96px"
Form1.Controls.Add(TextBox1) //
InitializeComponent()
// this is an example on in a table into a placeHolder
// go can do the same with the above
private HtmlTable insertTblASP( PlaceHolder placeX)
{
HtmlTable tblx = new HtmlTable();
placeX.Controls.Add(tblx);
return tblx;
}
I hopes this helps. Signed... Linda
xxx
|
|
|
|