|
Read the article that he sent you the link to.
|
|
|
|
|
I have table like that:
wel here is Event
void grid_RowCreated(object sender, GridViewRowEventArgs e) {
if (e.Row.DataItem == null) {
return;
}
LinkButton cmdCity = (LinkButton)e.Row.FindControl("cmdCity");
if (cmdCity != null) {
int id = (int)grid.DataKeys[e.Row.RowIndex].Value;
cmdCity.CommandArgument = id.ToString();
}
}
and this event retrieves from data only one field concrete ID
I want to retriwe another ID's to like countryid, regionid or etc.
How do that??
C# Developer
|
|
|
|
|
It isn't very clear to me what you are asking?
only two letters away from being an asset
|
|
|
|
|
The obvious way is to create a string datakey which is an amalgamation of ids. There's only one data key value, so it needs to contain the values you want, or give you what you need to look them up
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have not written whole code but
when This Event will rise, corresponding row from data binds to e.Row.DataItem
and this line
int id = (int)grid.DataKeys[e.Row.RowIndex].Value;
retrieves only one field from data and it's PK ID.
I want to retrieve aother values too.
there is grid.DataKeys[e.Row.RowIndex].Values too, but i didn't understand ho do it.
C# Developer
|
|
|
|
|
Hello Everyone,
I want some of my website pages secure (SSL enabled) because I need to transmit sensitive information.
I read some of the articles on WEB, but none of them seems to give me accurate and step by step instructions on doing it.
Please help me out regarding this.
Thank you.
|
|
|
|
|
For this you need a certificate that must be installed on IIS.Even you generate the certificate request from IIS also and get the certificate from.For detail step see the Link
|
|
|
|
|
chintanstrings wrote: but none of them seems to give me accurate and step by step instructions on doing it.
Step By Step Guide For SSL
Hope this will help you !
|
|
|
|
|
|
You are welcome
|
|
|
|
|
I have created a very powerful web-based software as part of my thesis. Though, nobody helped me in my project, yet I have to submit my software with full source code. Some of the features of my software are unique & even not available in SAS or SPSS. However, some of the scientists at my Instt. will publish & commercialize it without mentioning my name anywhere and all my effort will so far, would become futile.
Is there, any way that I can make the source code uneditable or encrypted, so that nobody can edit it except me. Or is there any way that I put my name in the source code such that nobody will be able to remove afterwards.
Please help
|
|
|
|
|
I beleive you have developed your project is layer architecture manner like BLL, DAL and UI . and for BLL and DAL you haev your own dlls. So try to obsfucate the dll using some tool and Before giving the site, give the published version of your site, DO NOT give the website by just as copy paste. Give the Published Version.
And have a look around the google, you will also find some alternative solution.
|
|
|
|
|
Abhijit Jana wrote: So try to obsfucate the dll using some tool and Before giving the site
Do you really need that?[^]
|
|
|
|
|
No Software Is Truly Safe
By the way navaneeth, Here is my latest one. Have a look
|
|
|
|
|
One thing you can,you can obfuscate the code,so that nobody will be able to understand.For this you can use visual studio obsfucator.You can also find list of obsfucator here
|
|
|
|
|
If they can read it to mark it, they can copy it. Therefore, you have no options. I believe most schools basically assume they own your code. Is it really that great ? I mean, should you consider leaving to commercialise it ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I've never tried this with a Web application, but you can create native images of your .NET libraries using NGen.exe[^]. As long as their processor is the same as yours, the DLLs/EXEs will run. Again, don't know how well that works in a Web-based application. YMMV.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I have a web form with a table control. No. of columns & no. of rows are asked by user and table is generated with cells filled with textboxes dynamically. The id of textboxes are generated dynamically. User enters the values in textboxes in table & click calculate button, on which I want to supply a set of results based on input data. Can anybody tell me how to fetch the value entered in a textbox at runtime. I am using following code.
public void CreateTableRawData(int rows)
{
for (int i = 0; i < rows; i++)
{
TableRow tr = new TableRow();
TableCell td = new TableCell();
TextBox txt = new TextBox();
td.Controls.Add(txt);
txt.ID = "txt" + i.ToString();
tr.Cells.Add(td);
Table1.Rows.Add(tr);
Table1.Caption = "Raw Data Form";
}
}
protected void Button2_Click(object sender, EventArgs e)
{
int rows = Convert.ToInt32(TextBox_rows.Text.ToString());
double[] data = new double[rows];
string [] dataText = new string[rows];
Table tbl = (Table)Panel1.FindControl("Table1");
for (int i = 0; i < rows; i++)
{
data[i] = Convert.ToDouble(Table1.Rows[i].Cells[0].Text.ToString());
}
data[0] = Convert.ToDouble(Table1.Rows[0].Cells[0].ToString());
Label lbl = new Label();
double sum = DistributionFitting.Statistics.Sum(data);
lbl.Text = sum.ToString();
}
I am getting following error at runtime.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
|
|
|
|
|
ashutosh_karna wrote: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
As exception shows,you must be accessing some array's index that doesn't hold.Debug it ,you'll be able to get the problem
|
|
|
|
|
Try to debug your application and check which line is throwing the exception. check the index of the array.
One more important thing, you are creating the textboxes runtime. You need to create the textbox before Page_load() . Because in ASP.NET Page life cycle, ViewState Data and PostBack data loads just before the Pageload. So if you create any control after page load you can't restore the postback and view state data.
The best option, try to create your controls in Page_PreInit() Event.
|
|
|
|
|
Hi,
I need to change my web application in such a way that , I need to apply different styles(different css files,different images) for the same pages for different users.So when different users sign in they will see the same pages in different colors .Is it possible
Regards
Jophin
jophin
|
|
|
|
|
I can suggest you two different you implement.
1) ASP.NET Profiles : ASP.NET having inbuilt features to implement it. Please read this article
2) Data Base : Store user choice theme in the database and retreive the data (Theme/css name) from DB while user login an apply it. Update database if user change the reference.
Hope this will help you
|
|
|
|
|
Thank you Abhijeet,
Let me have a try.
Regards
Jophin
jophin
|
|
|
|
|
It is very much possible.Use asp.net Theme for detail Have a look
Save the theme as per user basis in the database and when loading the application read it from database and load the theme accordingly.
|
|
|
|
|
Thank you very much Brij,
I tried this and it works .But still I am having another issue, there are palces in which images are loading from client side.
Because of this I am having two problems.
1. They are not getting loaded because the previous location of images folder is changed are changed.
2. How I can make these images also dynamic according to the theme applied
Thanks in Advance
Jophin
jophin
|
|
|
|