|
|
Hi all,
I want to install some prerequisite programs before intsall my web application.
Please how do I add these programs to my web application setup program.
Thanks.
SPC Nigeria
Thanks.
|
|
|
|
|
HI,
This is Junaid
I have a query regarding application deployment. I want my asp.net application (developed under vs 2008) to be executed under x64 based architecture, for that I compile my application for x64 based architecture by changing in complication settings for x64. I just want to will this application run successfully on x64 based architecture , because it complied on 32bit OS (probably win xp) , I just change the complication settings.
Regards
Junaid
|
|
|
|
|
Yes It should work. The only thing is that the IIS in the 64-bit server needs to be set to work in 64-bit mode.
Hope the followin threads will help you
Thread 1[^]
Thread 2[^]
Link 1[^]
|
|
|
|
|
Hi,
I have C# ActiveX control or (Win-form library) Using ASP.Net
When web-page display on browser,prompt Message display "Security-Warn"
with two button
Run Or Don't Run, button.
I don't want to Show this Prompt Messages or asking me for run.
i don't Want to Set Browser Setting plus.
This is possible though Codes in VBScript,JavaScript etc.
|
|
|
|
|
ActiveX controls cannot be enabled by code. It should be enabled manually in the browser's setttings.
|
|
|
|
|
Hi,
I need to create specified number of buttons dynamically with events.
can anyone plz provide me de code, its urgent.
beula,
cmots infotech.
|
|
|
|
|
|
thanks a lot
beula,
cmots infotech.
|
|
|
|
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class TempEvent : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Button btn = new Button();
btn.ID = "btnnew";
Panel1.Controls.Add(btn);
btn.Click += new EventHandler(btn_Click);
}
protected void btn_Click(object sender, EventArgs e)
{
Response.Write("hi");
}
}
Padmanabhan
|
|
|
|
|
Hi,
I have a country master.I want to display code and name of the country in a gridview using csharp.
I have an add new button,if i click on that button a new empty row should get added to the gridview,where i can enter a new country details.Like that if a i click on that button for required number of times,that many rows should get added.
I should insert into the table(SQL server2005) on click of an update button at one shot.
Someone please help me out to achieve this application.....
waiting for a positive reply..
|
|
|
|
|
public void EmptyGrid()
{
DataTable TempTable = new DataTable();
TempTable.Columns.Add("sino");
TempTable.Columns.Add("name");
TempTable.Columns.Add("gender");
TempTable.Columns.Add("qualification");
TempTable.PrimaryKey = new DataColumn[] { TempTable.Columns["sino"] };
TempTable = BindEmptyRows(3, TempTable);
GridView1.DataSource = TempTable;
GridView1.DataBind();
}
//Method to Bind Rows
private DataTable BindEmptyRows(int nofoRows, DataTable dt)
{
for (int i = 0; i < nofoRows; i++)
{
DataRow dr = dt.NewRow();
dr["sino"] = dt.Rows.Count + 1;
dr["name"] = string.Empty;
dr["gender"] = "0";
dr["qualification"] = "0";
dt.Rows.Add(dr);
}
return dt;
}
//refer :Temporary Values in Grid[^]">
Padmanabhan
|
|
|
|
|
Hi,thanx for imm. reply.
This is fine if rows are fixed...
I want dynamic number of rows to be added on click of a button outside the gridview....
iam a beginner in .net..
|
|
|
|
|
Hi,on click of a button iam able to add a new row....i tried and i used the logic given by you...
Thanx a lot..
|
|
|
|
|
//these two methods will create 3 rows in page load
public void EmptyGrid()
{
DataTable TempTable = new DataTable();
TempTable.Columns.Add("sino");
TempTable.Columns.Add("name");
TempTable.Columns.Add("gender");
TempTable.Columns.Add("qualification");
TempTable.PrimaryKey = new DataColumn[] { TempTable.Columns["sino"] };
TempTable = BindEmptyRows(3, TempTable);
GridView1.DataSource = TempTable;
GridView1.DataBind();
}
//Method to Bind Rows
private DataTable BindEmptyRows(int nofoRows, DataTable dt)
{
for (int i = 0; i < nofoRows; i++)
{
DataRow dr = dt.NewRow();
dr["sino"] = dt.Rows.Count + 1;
dr["name"] = string.Empty;
dr["gender"] = "0";
dr["qualification"] = "0";
dt.Rows.Add(dr);
}
return dt;
}
//when u click a button outside the grid then
protected void btnNew_Click(object sender, EventArgs e)
{
SaveGridDataInTempTable();
DataTable dtNew = Temp.Copy();
BindEmptyRows(1, dtNew);
Temp = dtNew;
GridView1.DataSource = dtNew;
GridView1.DataBind();
}
//each and every click it will create a new row
Padmanabhan
|
|
|
|
|
Hi,
In my application i have java script method to open a new window, when i click a button new window is opening , but before opening new window i want to make fire postback to server from the Parent page, how can i do this plz let me give reply...
function window()
{
window.open("secondpage.aspx","_blank","width=475px,height=100px");
}
am calling this method like OnClientClick="return Window() in the source page.
|
|
|
|
|
Since window is a javascript keyword, change your function name window() to something like openWindow
function openWindow()
{
document.forms[0].submit();
window.open("secondpage.aspx","_blank","width=475px,height=100px");
}
|
|
|
|
|
Hi,
Let me clearly explain my problem,
This is my java script function to open new window,
function openWindow()
{
document.forms[0].submit();
var sUrl = "aspxSecond.aspx";
var sFeatures = "width=475px,height=100px,left=350px,top=400px,location=no,";
window.open(sUrl,"_blank",sFeatures);
}
I am calling the method like,
<asp:button id="btn" runat="server" onclientclick="return openWindow();" text="Export">
And i write the server side code for the btn click,
Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click
session("val")=1
End sub
In the second page i should get the session value as soon as i need to clear the session value...so every click i need to pass the session value.
BUT The PROBLEM is the btn_click is not firing for second time click ...
if any clarification plz let me ask..
Regards,
|
|
|
|
|
Don't worry about it!
if you wanna go back from the current page to your parent page!
you can write like this:
function openWindow(){
var handle=window.open("url");//this is a new window.
//if you wanna close the new window,you can write:
handle.close();
//if you wanna go to the parent window,you can write:
document.parent.window.location.href="parent url";
}
|
|
|
|
|
I have a griview in my page with paging. The gridview contains the first column as UserId which is a Datakey column. The issue is when I go to secondpage, it is giving the error saying that " Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" .
On the second page, the index getting is 10. What am I doing wrong here? How should i get the datakey value? Following is the code I'm using.
int Userid = 0;
int index = 0;
foreach (GridViewRow gvr in SearchGrid.Rows)
{
CheckBox cb = (CheckBox)gvr.FindControl("chkbox1");
if (cb.Checked)
{
index = gvr.DataItemIndex;
Userid = Convert.ToInt32(SearchGrid.DataKeys[index].Value);
}
}
I am getting error on the last line when clicked on 2nd page. Can anybody provide any solution?
Thanks in advance.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
//if u r using only one datakey, then use like this
Userid = Convert.ToInt32(SearchGrid.DataKeys[index][0].Value);
Padmanabhan
|
|
|
|
|
I think this cannot be done. Because everytime I will ge the value at Index 0.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
DataKeys[index][0] in this index points ur row index and [0] points ur no.of datakeys u have...
if u give 2 datakeys named as sino and id
sino= Convert.ToInt32(SearchGrid.DataKeys[index][0].Value); //gives sino
id= Convert.ToInt32(SearchGrid.DataKeys[index][1].Value); //gives id
(or)
sino= Convert.ToInt32(SearchGrid.DataKeys[index]["sino"].Value); //sino
id= Convert.ToInt32(SearchGrid.DataKeys[index]["id"].Value); //gives id
Padmanabhan
|
|
|
|
|
oh.. Thank you very much. the information is pretty clear. thanks
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
You are looping through GridViewRows collection, therefore use GridViewRow.RowIndex property to get the index of the row in the for loop. Also change your code like this
index = gvr.RowIndex;
Userid = Convert.ToInt32(SearchGrid.DataKeys[index].Value);
|
|
|
|