|
Thank you for answer.
But i need to show list of member.
So i need to show list when Page_load.
Is There any way to get dynamic control id when post back?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
buffering83 wrote: Is There any way to get dynamic control id when post back?
You create the control, you have it and the ID.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Your question is not quite clear as of you mentioned of poor English of yours. So that It can be little misunderstanding but AFA I understood the question I can give you following reply.
I am in confuse of Either you want to generate dynamic control ID or you want to find that control ID.
So It's clear from your code that assigning global variable can make some work for you, by that any name you're assigning inside IF loop that will be stored in a global variable and you can find that ID whenever you wanted. or if you want to make that control ID accessible from anywhere then you can have static variable.
Sorry If I am getting you wrong.
|
|
|
|
|
hi,
I need to show reminder for every user through our application.If it Is Possible with windows service?. Could you please suggest me a better way.
regards,
vishnu.
|
|
|
|
|
vishnukamath wrote: I need to show reminder for every user through our application.
What type of application you're talking about ?
vishnukamath wrote: If it Is Possible with windows service?
If it's regarding windows service then Ask in Appropriate forum like Windows forms or C#
Your question is not clear.
|
|
|
|
|
|
I don't need the help regarding, Please reply to the post as a reply to OP.
|
|
|
|
|
hi
i am having a web parts and those web parts are working fine when i run from my solution and not working when i deploy to server and accessing those web parts. after spending time on reading some articles i got that the personalization data's are getting saved in aspnetdb database, i have run installpersonalization.sql in my development database its giving same functionality as it should be.
i have customized my database with those script tables and procedures, still i am not able to access web parts functionality when i am accessing server link, it may be because of authentication anonoyms in iis, my query was how to get access of web parts when i am accessing through server after deployment.
how to configure web parts in anonoyms user.
thanks..
|
|
|
|
|
|
|
If your database file is inside a datadirectory then you can use.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\myDatabase.mdb;Persist Security Info=true"
See HERE[^] for more.
|
|
|
|
|
|
Hi sheemap,
Hiren Solanki wrote: See HERE[^] for more.
What Hiren said is absolutely true.
BTW if you go through that link, you can learn how to configure connections string with different databases, data files ..etc.
Happy Coding...
|
|
|
|
|
|
Dear Ravi,
Matter here is not about storing a connection string in a safe place.
Please get into the question properly.
|
|
|
|
|
Hiren Solanki wrote: Please get into the question properly.
Of-course I did it before posting my answer.
Hiren Solanki wrote: Matter here is not about storing a connection string in a safe place.
He just want to know how to create a connection for Web programming and I just referring him Links with valuable advice whatever, thanks for your advice.
|
|
|
|
|
Dear Friends,
I want to open a file on the click of a link in the Grid named as VIEW. The path I am binding to is the local path i.e., ~/Documents/ScanDoc/[FileName] but when i am opening it on the local server; I am getting the error as follows:-
File does not exist.
System.Web.HttpException: File does not exist. at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response) at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
But when I updated the PathColumn in database with this value:-"http://localhost:1383/~/Document/ScanDoc/[FileName]" which is actually being saved as "Documents/ScanDoc/[FileName]", the thing worked and i was able to see the file when i clicked on the link.
Now my problem is that how could i bind "http://localhost:1383/~" path to "Documents/ScanDoc/[FileName]" which is being saved in the database.
Thanks
Varun Sareen (Dot Net Developer)
|
|
|
|
|
Just grab the Url Authority like
String UrlAuthority = String.Format("http://{0}",Request.Url.Authority);
Now make a string of your static path
String Path = "Documents/ScanDoc/[FileName]";
Combine both for final Output
String FullPath = Path.Combine(UrlAuthority,Path);
And you're done.
|
|
|
|
|
Thanks Hiren, the thing you told worked
Varun Sareen (Dot Net Developer)
|
|
|
|
|
Glad it helped you.
You can always rate Answer if it helped you.
|
|
|
|
|
Following code does not handle columns that start with +. for example,
'+923339933886' is not rendered well(some kind of charmap characters shown).
HtmlForm form = new HtmlForm();
string attachment = "attachment; filename=Employee.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter stw = new StringWriter();
HtmlTextWriter htextw = new HtmlTextWriter(stw);
form.Controls.Add(gvEmployee);
this.Controls.Add(form);
form.RenderControl(htextw);
Response.Write(stw.ToString());
Response.End();
Please let me know what is the changes required in this code.
|
|
|
|
|
Are you sure you will get a better response this time then That[^]?
|
|
|
|
|
Check my answer here[^] for your question.
BTW please wait for the replies don't post duplicate questions. cheers.
|
|
|
|
|
Hi All,
I've got the following lines in my button click handler.
if (!this.CheckObjectivesCheckBoxesValid())
{
var repeaterValidator = new CustomValidator();
repeaterValidator.IsValid = false;
repeaterValidator.ErrorMessage = "Please select at least one objective.";
Page.Validators.Add(repeaterValidator);
}
if (string.IsNullOrEmpty(this.txtDetails.Text) && string.IsNullOrEmpty(this.txtSuggestions.Text) && string.IsNullOrEmpty(this.txtSupportingEvidence.Text))
{
var requiredFields = new CustomValidator();
requiredFields.IsValid = false;
requiredFields.ErrorMessage = "You must include information in at least one of Details, Suggestions or Evidence";
Page.Validators.Add(requiredFields);
}
But the validation never seems to happen ...
Any ideas?
|
|
|
|
|
I tested your code and It's passing through IF and later adding to Validators it doesn't seem to display an Error Message.
You can have a Look to This CP Article[^]
|
|
|
|