|
how to chk a control is present or not using codebehind
for eg if
tis hyperlink ctrl "HylEdit.Text" is not present then the code should skip the control
and apply changes to the controls present on that pages
for egs,
if HylEdit.Text is not present then it should chk for next ctrl lik
HylView.Text
if the above ctrl is present the it shoul apply for HylView.Text=rm.GetString("View", ci)
the fn is lik tis
Private Sub LoadStrings(ByVal ci As CultureInfo)
HylEdit.Text = rm.GetString("Add", ci)
BtnClear.Text = rm.GetString("Clear", ci)
BtnSave.Text = rm.GetString("Save", ci)
HylView.Text = rm.GetString("View", ci)
|
|
|
|
|
findControl(Control). If it is NULL it is not there.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
if the ctrl is not there declaration error is
comin in find control statement...
if i fincontrol gridviw which is not in t page it shows
errror tat gridview is not declared
|
|
|
|
|
Are you testing Visual Studio.NET? By the way, not a bad idea for next version of VS2010.
There is no foolish question, there is no final answer...
|
|
|
|
|
Hi to all,
My project has reading mails from mail server.
the mail server is not in OUTLOOK. Its like a Exchange server like gmail,yahoo & so on...I am reading all the mails & save the attachments.
I am Using the sample Application is.,
http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx
But I can't read UNREAD mails.there is no flag in that application.
So How to read UNREAD mails from mail server???
Thanks,
nkmKrishna.
|
|
|
|
|
You're pretty stupid, aren't you ? We keep telling you that these are not ASP.NET questions, yet you keep posting them here. Have you tried asking the author of the article for help ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You can look for the link,
http://bytes.com/topic/c-sharp/answers/874837-check-unread-emails
|
|
|
|
|
Hi all,
i have links to attached documents(xcel, word, access,...) that resides on the server that open when pressing it. Normally it pops up a msg that notifies you what to do (open, save, cancel). I need to cancel this msg and directly open the file. Is that possible?
|
|
|
|
|
i hav a function called loadstring
which loads the value for the controls of the page
the function look lik tis
Private Sub LoadStrings(ByVal ci As CultureInfo)
HylEdit.Text = rm.GetString("Add", ci)
BtnClear.Text = rm.GetString("Clear", ci)
BtnSave.Text = rm.GetString("Save", ci)
HylView.Text = rm.GetString("View", ci)
TDAwd.InnerText = rm.GetString("Awd", ci)
TDAwdDes.InnerText = rm.GetString("Awddes", ci)
TDAwdpic.InnerText = rm.GetString("Awdpi", ci)
TDFreq.InnerText = rm.GetString("Freq", ci)
TDAwdcri.InnerText = rm.GetString("Awdcri", ci)
TDAwdSt.InnerText = rm.GetString("AwdSt", ci)
TDAwdk.InnerText = rm.GetString("Awdk", ci)
i want to write tis code in common for all the pages
the problem is some controls will be there or will not be according to the page
for eg some pg will hav gridview and some will not..
here if control is not present in the pg its shows error
is their any way to solve tis
|
|
|
|
|
Hi guys,
i have to upload only images/flash files...,
those dimensions cant exceed what i have said...,
how to check and upload those images/flash files using ajax...,
plz guide me...,
suppose if i say the image dimension is 300*250...,
it have to accept that much only...,
cant accept 301*250 also...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
As far as I know this isnt possible with plain ASP.NET
|
|
|
|
|
roguemat wrote: As far as I know this isnt possible with plain ASP.NET
Why?
|
|
|
|
|
Member 3879881 wrote: suppose if i say the image dimension is 300*250...,
it have to accept that much only...,
cant accept 301*250 also...,
Here is an simple logic, Hope this will help you
int imgWidth=301;
int imgHeight=250;
if(ValidateImageDimension(FileUpload.PostedFile.InputStream, 301, 250));
{
}
else
{
}
Here is the generic function
public bool ValidateImageDimension(Stream imgstream, int imgWidth, int imgHeight)
{
System.Drawing.Image img = System.Drawing.Image.FromStream(imgstream);
if (img.Width <= imgWidth && img.Height <= imgHeight)
return true;
else
return false;
}
Hope this will help you.
|
|
|
|
|
Wow, wish I had know this, I needed it a while back and asked around and the couple of people I spoke to said its impossible to do anything with the file until it has been uploaded...
Shot
|
|
|
|
|
Hello,
There are 43 textboxes on the web page of my database driven web application. Generally, what we do: (ds means dataset object)
ds.Tables(0).Rows(r - 1).Item(0)=Textbox1.text
ds.Tables(0).Rows(r - 1).Item(1)=Textbox2.text
... or something like it.
Now suppose, if user changed the values of textbox 17,23 and/or 5,8,31; then update should be only for those column; to avoid unnecessary I/O and faster update. Is there any mean/method in ASP.NET by which we can control only limited update in table.
Please guide,help and teach me.
Best Regards
Girish Sharma
|
|
|
|
|
Do the text boxes have autopostback set to true?
There is no foolish question, there is no final answer...
|
|
|
|
|
No, because i think it will unnecessary increase network traffic and more request to server though.
|
|
|
|
|
Ok that's fine. In the button click event, just check whether the text box's value equals to the datatable rows' value or not. if it is not then only update the column else don't. Just checkout the sample code:
if(dataSet.Tables[0].Rows[8][column_name] != textBox8.Text)
{
dataSet.Tables[0].Rows[8][column_name] = textBox8.Text
}
So the datatable will be updated only when the value differs from the earlier one and that means that the text box's value is changed.
Is it clear? Revert back for any clarification.
There is no foolish question, there is no final answer...
|
|
|
|
|
Thanks for your reply; but at the last for saving the new values in the database; i will have to call adapter.update(ds); it means it will fire the complete update command. And moreover i am using following code to create dataset:
Dim ods As New DataSet
ods.ReadXml("C:\Inetpub\wwwroot\Exam2\Temp.xml")
So,
1.will it work on the dataset and update the table ?
2.and i will have to call adapter.update(ods); means a complete update command ?
What i am seeking, that after changing the values in textboxes; only those columns should be updated; rather than a complete row.
Regards
Girish Sharma
|
|
|
|
|
The you can probably look a for writing a sql query for updating fields. You can run a for loop to check the values and after that fire the sql query only for those columns whose values are changed. DataAdapter.Update may not be a best case in this scenario.
There is no foolish question, there is no final answer...
|
|
|
|
|
Here one idea/approach may be using javascript. A javascript function, which will be called on textbox change event (if value changed then) with create and append a update command and then fire that update command on cliking the update button; but i do'nt have knowledge in js; just have the idea how it may worked.
|
|
|
|
|
You will not be able to access the value which is set in javascript because on the server side those values will be lost.
There is no foolish question, there is no final answer...
|
|
|
|
|
Then please tell me the best and easy method to get update command for selected (changed values) columns.
Kind Regards
Girish Sharma
|
|
|
|
|
Then please provide me the solution by which i can get one update command for only those columns whose textbox values has been changed by user.
Kind Regards
Girish Sharma
|
|
|
|
|