|
Hi,
I have implemented the ICallbackEventhander interface and successfully updating the page asynchroniously on keydown on a textbox. I tried to implement the same with the click event of the asp.net button or imagebutton's click event but RaiseCallback is invoked and then the GetCallbackResult() is called but the last client side javascript function is not called that infact updates the page, hence the page not updates. Also once the page is partially updated on keydown of textbox, after that no server side event is triggers. What could be the issue. Any code or reference url for the solution of this problem will be much appreciated.
Thanks,
Safvi
|
|
|
|
|
|
Hello,
I am new to ASP.net. I am trying to access a string sent by Response.Redirect() from one web page to the other but without any success. Everytime the string is null. Here is the code in the first page of the link button click event:-
protected void LinkButton1_Click(object sender, EventArgs e)
{
string ProjName = "xyz";
Response.Redirect("\\Manager\\ProjectwiseExpenditurePage.aspx?ProjName");
}
The string ProjName is having the value "xyz" when it executes. However when the control goes to the next page, in the Page_Load(), the string value is null. Here is the code in the Page_Load of the next page:-
protected void Page_Load(object sender, EventArgs e)
{
string ProjectName = "";
if (Request.QueryString.Count > 0)
{
ProjectName = Request.QueryString["ProjName"];
MessageBox.Show(ProjectName);
}
}
The count value is 1 and the if statement gets executed. However the string ProjName is null. The message box doesn't display any string value.
Hope to get this code working at the earliest.
Thanks in advance
Vidya
|
|
|
|
|
Your code should be like below.
protected void LinkButton1_Click(object sender, EventArgs e)
{
string ProjName = "xyz";
Response.Redirect("\\Manager\\ProjectwiseExpenditurePage.aspx?ProjName=" + ProjName);
}
|
|
|
|
|
|
Thanks Sandeep. That helped me and solved my problem
Here is the working code:-
1st page code:-
protected void LinkButton1_Click(object sender, EventArgs e)
{
string ProjName = "xyz";
Response.Redirect("\\Manager\\ProjectwiseExpenditurePage.aspx?" + "Name=" + Server.UrlEncode(ProjName));
}
2nd page code:-
protected void Page_Load(object sender, EventArgs e)
{
string Name = "";
if (Request.QueryString.Count > 0)
{
this.TextBox1.Text = Request.QueryString["Name"];
}
}
Vidya
|
|
|
|
|
Hi All,
I want to upload file using File upload in asp.net and C# and save this content to the database in text format. after that i want link in grid view so give download option.
thanks,
Amit
|
|
|
|
|
FileUpload FileUpload1 = new FileUpload();
if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0)
{
byte[] file = FileUpload1.FileBytes;
string fileExtention = string.Empty;
fileExtention = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
}
Raju.M
|
|
|
|
|
Amit Patel1985 wrote: save this content to the database in text format
I believe this means path location.
Amit Patel1985 wrote: i want link in grid view so give download option.
Did you tried CP search? Here is one of the article:
Displaying Image in Gridview from Database[^]
|
|
|
|
|
Hi everyone,
I have tried the Java Script window.print()..unfortunatly it only prints the whole website...
is there a way that i can pass a file to print instead? e.g. C:/testing.pdf
Or there any other way i can open a print dialog whilst passing a file that should be printed?
Please help me...
|
|
|
|
|
|
Guys,
I'm very naive to .Net. I am using SQL EXpress database as my backend. I want to retrieve data from DataBase and display it in the Crystal REport ... Can any me regarding this ...
I googled a lot but with SQLEXpress iam unable to do it... Please help me rearding this...
Thanks in advance.... Smile
|
|
|
|
|
|
Please don't post the same question in multiple forums. Pick one and stick to it.
Posting at multiple forums is considered rude.
|
|
|
|
|
Currently I have a web application that is in use. It uses the default asp.net membership provider for all the users and roles. I really want to convert this to something I have made myself so I can understand more of how it works and the code that makes it work. It will just make it easier I think in case some things go wrong and for me to customize stuff.
Anyways I am capable of storing a entered password in SHA256. I understand that I can store the encrypted password in the database and just compare the username and password to it when entered (first of course you must converted entered information into SHA256 and then compare).
Now what I don't know how to do or understand is the Salt methods that is currently used. I understand that this generates a random code for each user. I have also read some places where it combines the salt and encrypted password for verification??
So let me ask if it works like this...
User creates a new user which generates a SHA256 password (encrypted in 'Password' field), then a random 'Salt' encryption is generated and saved in a 'PasswordSalt' field... also the username and other informaiton is saved as well.
So when the user logs in it takes their username and password and looks up in the database for those fields (Searching by USERNAME)... Once it gets the Password column and PAsswordSalt column what does it do? I'm assuming at this point the password is just encrypted to SHA256? If that is the case what is the need for the PasswordSalt? Sorry if I sound dumb, im just trying to understand this.
|
|
|
|
|
|
Hi All,
I have rad window in which there is a ASP.Net Save Button and Rad Tabstrip control. I have Rad tool kit installed on my machine.
When I run the application in machine the save button is working fine. But when I moved it to the QA Server, its not working at all. Can anybody pls help me in resolving this issue to work everything in every machine.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
But we need more details about error so that we can help you & also Telerik is 3rd party component so that we can guess only limited.
|
|
|
|
|
i use Telerik and Infragistics all the Time. what is the Error that you are getting ? why do you say its not working ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hello,
I'm working on a project that I'm trying to export data from textboxes in asp.net website project to a powerpoint file. I writing ofcourse in C#.
The whole concept is to use the data the a user inserts to the text boxes and they are sent after clicking a OK button directly to a powerpoint file. I'm using OFFICE 2007 so I'm using powerpoint 2007 for this.
A similar concept that I'm already using in the website project is doing the same thing but exporting to a WORD format file. I bumped against this following site a software to perform this and it's called: SoftArtisans. There website is http://www.softartisans.com/ .
Now, if somebody has a clue or a tutorial how I can do this, Export to a powerpoint file I'll be very thankful.
I am also using Microsoft SQL Server 2008 R2 to save the data in the database, so if maybe someone knows how to export the data from the textboxes from the website TO the database and then TO the powerpoint file that could help to.
Thank you very much for your help and support.
modified on Friday, June 25, 2010 11:24 AM
|
|
|
|
|
|
I'm trying to export the data from textboxes in my website. I don't want to export the whole website or the whole page to a file. I have an templete file that in it I have some merge field that I want the data from the textboxes in the website to get exported to the merged fields.
that's it, thanks
|
|
|
|
|
You are going to have to write code to do that.
Office 2007 / 2010 uses the OpenXML format, so in order to
watchdogger wrote: export the data from textboxes in my website
You are going to need to manipulate the actual document yourself. You are going to have to read up on the OpenXML format and then write some code to accomplish your task.
If you don`t want to
watchdogger wrote: export the whole website or the whole page to a file
Then don`t code it that way.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hello All,
I need to search recursive control inside gridview
i have written below code but i can not able to find the control in which are define in <asp:templatefield> I have taken on linkbutton inside templated field but when i try to search control but i didn't get.
Code :
public static Control FindControlRecursive(Control Root, string Id)
{
if (Root.ID == Id)
return Root;
foreach (Control Ctl in Root.Controls)
{
Control FoundCtl = FindControlRecursive(Ctl, Id);
if (FoundCtl != null)
return FoundCtl;
}
return null;
}
but it return null while i am try to find out control like
LinkButton B = FindControlRecursive(GridView1, "lnk") as LinkButton;
can you please help how to resolved above issue?
Thanks in advance,
Anish Patel
|
|
|
|
|
Hi! in future post, try using the code block just for better understanding of the code
Well, the Control, must be a GridView, so you can add
public static Control FindControlRecursive(Control Root, string Id)
{
if (Root.ID == Id)
return ((GridView)Root);
if (Root is GridView)
{
GridView gv = ((GridView)Root);
Int32 num = 3;
Int32 row = 1;
Control FoundCtl = ((Control)gv.Rows[row].Cells[num].FindControl(Id));
if (FoundCtl != null)
return FoundCtl;
}
return null;
}
Remember that in ASP.NET the dinamically controls added like in grid view Template field, have the same name, except in Client-Side. if you want a especific row, you only need to change the row parameter
|
|
|
|